init project
This commit is contained in:
1 parent
d63cc8d9f5
commit
ee07869839
39 files changed
+1560
-622
No files matched your search
@@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"git.xiaotuo.co/micro/skeleton/internal/runtime"
|
||||
"git.xiaotuo.co/micro/skeleton/pkg/util"
|
||||
"git.xiaotuo.co/pkg/tool/stringx"
|
||||
"github.com/google/uuid"
|
||||
"github.com/robfig/cron/v3"
|
||||
"micro_layout/internal/runtime"
|
||||
"micro_layout/pkg/util"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
@@ -20,7 +20,7 @@ type Crontab struct {
|
||||
func NewCrontab() *Crontab {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
opts := &runtime.Options{
|
||||
ID: stringx.MakeUUID(),
|
||||
ID: uuid.NewString(),
|
||||
Type: "crontab",
|
||||
Context: ctx,
|
||||
}
|
||||
@@ -52,7 +52,7 @@ func (m *Crontab) Start() error {
|
||||
|
||||
<-m.options.Context.Done()
|
||||
log.Infof("crontab done")
|
||||
c.Stop()
|
||||
<-c.Stop().Done()
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user