checking execution more often for dev purposes

This commit is contained in:
pb 2025-04-17 19:57:55 +02:00
parent a59a48cc66
commit 012c8a83cb

View File

@ -111,11 +111,11 @@ func (s *ScheduleManager) listenForChange(nc *nats.Conn, chanName string, delete
// Used at launch of the component to retrieve the next scheduled workflows // Used at launch of the component to retrieve the next scheduled workflows
// and then every X minutes in case some workflows were scheduled before launch // and then every X minutes in case some workflows were scheduled before launch
func (s *ScheduleManager) SchedulePolling() { func (s *ScheduleManager) SchedulePolling() {
var sleep_time float64 = 1 var sleep_time float64 = 20
for { for {
s.getNextScheduledWorkflows(1) s.getNextScheduledWorkflows(1)
s.Logger.Info().Msg("Current list of schedules -------> " + fmt.Sprintf("%v", len(Executions.Execs))) s.Logger.Info().Msg("Current list of schedules -------> " + fmt.Sprintf("%v", len(Executions.Execs)))
time.Sleep(time.Minute * time.Duration(sleep_time)) time.Sleep(time.Second * time.Duration(sleep_time))
} }
} }
func (s *ScheduleManager) getExecution(from time.Time, to time.Time) (exec_list []*workflow_execution.WorkflowExecution, err error) { func (s *ScheduleManager) getExecution(from time.Time, to time.Time) (exec_list []*workflow_execution.WorkflowExecution, err error) {