mongo and or

This commit is contained in:
mr 2024-08-02 16:09:17 +02:00
parent 2525cc7783
commit 89f14d99b8
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func (wfa *workflowMongoAccessor) execution(realData *Workflow, delete bool) (in
obj := &workflow_execution.WorkflowExecution{
ExecDate: &s,
EndDate: realData.Schedule.End,
State: 0,
State: 1,
WorkflowID: realData.UUID,
}
accessor.StoreOne(obj)
@ -61,7 +61,7 @@ func (wfa *workflowMongoAccessor) execution(realData *Workflow, delete bool) (in
obj := &workflow_execution.WorkflowExecution{
ExecDate: realData.Schedule.Start,
EndDate: realData.Schedule.End,
State: 0,
State: 1,
WorkflowID: realData.UUID,
}
accessor.StoreOne(obj)

View File

@ -11,7 +11,7 @@ import (
type ScheduledType int
const (
SCHEDULED ScheduledType = iota
SCHEDULED ScheduledType = iota + 1
STARTED
FAILURE
SUCCESS
@ -41,7 +41,7 @@ type WorkflowExecution struct {
UUID string `json:"id,omitempty" bson:"id,omitempty" validate:"required"`
ExecDate *time.Time `json:"execution_date,omitempty" bson:"execution_date,omitempty" validate:"required"`
EndDate *time.Time `json:"end_date,omitempty" bson:"end_date,omitempty"`
State int `json:"state,omitempty" bson:"state,omitempty" `
State int64 `json:"state,omitempty" bson:"state,omitempty"`
WorkflowID string `json:"workflow_id" bson:"workflow_id,omitempty"`
}