feat(crontab): 添加crontab就绪事件到标准输出
This commit is contained in:
1 parent
c191974df7
commit
9f2092b7c5
1 file changed
+3
@@ -3,6 +3,7 @@ package crontab
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/robfig/cron/v3"
|
||||
@@ -48,6 +49,8 @@ func (m *Crontab) Start() error {
|
||||
// }))
|
||||
|
||||
c.Start()
|
||||
// Readiness is independent of application log filtering.
|
||||
fmt.Fprintln(os.Stdout, `{"event":"crontab_ready"}`)
|
||||
log.Infof("crontab start")
|
||||
|
||||
<-m.options.Context.Done()
|
||||
|
||||
Reference in new issue
Block a user