integrated local execution of oc-monitor
This commit is contained in:
@@ -96,7 +96,7 @@ func retrieveMapFromSub(message []byte) (result_map map[string]string) {
|
||||
func (s *ScheduleManager) SchedulePolling (){
|
||||
var sleep_time float64 = 1
|
||||
for(true){
|
||||
s.getNextScheduledWorkflows(1800)
|
||||
s.getNextScheduledWorkflows(3)
|
||||
|
||||
logger.Logger.Info().Msg("Current list of schedules")
|
||||
fmt.Println(s.bookings.Bookings)
|
||||
@@ -108,12 +108,10 @@ func (s *ScheduleManager) getWorfklowExecution(from time.Time, to time.Time) (ex
|
||||
|
||||
f := dbs.Filters{
|
||||
And: map[string][]dbs.Filter{
|
||||
"execution_date" : {{Operator : dbs.GTE.String(), Value: primitive.NewDateTimeFromTime(from)}},
|
||||
"end_date": {{Operator: dbs.LTE.String(), Value: primitive.NewDateTimeFromTime(to)}},
|
||||
// "state": {{Operator: dbs.EQUAL.String(), Value: 1}},
|
||||
"execution_date" : {{Operator : dbs.GTE.String(), Value: primitive.NewDateTimeFromTime(from)}, {Operator: dbs.LTE.String(), Value: primitive.NewDateTimeFromTime(to)}},
|
||||
"state": {{Operator: dbs.EQUAL.String(), Value: 1}},
|
||||
},
|
||||
}
|
||||
|
||||
res := oclib.Search(&f,"",oclib.LibDataEnum(oclib.WORKFLOW_EXECUTION))
|
||||
if res.Code != 200 {
|
||||
logger.Logger.Error().Msg("Error loading")
|
||||
|
||||
Reference in New Issue
Block a user