mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-01 15:06:52 +00:00
fix: different cronexpr rules between ui and pocketbase
This commit is contained in:
@@ -48,6 +48,8 @@ func (s *WorkflowService) InitSchedule(ctx context.Context) error {
|
||||
|
||||
scheduler := app.GetScheduler()
|
||||
for _, workflow := range workflows {
|
||||
var errs []error
|
||||
|
||||
err := scheduler.Add(fmt.Sprintf("workflow#%s", workflow.Id), workflow.TriggerCron, func() {
|
||||
s.StartRun(ctx, &dtos.WorkflowStartRunReq{
|
||||
WorkflowId: workflow.Id,
|
||||
@@ -55,7 +57,11 @@ func (s *WorkflowService) InitSchedule(ctx context.Context) error {
|
||||
})
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
if len(errs) > 0 {
|
||||
return errors.Join(errs...)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user