repair accessor call
This commit is contained in:
parent
0e96b5c01a
commit
5ab011844d
@ -24,10 +24,10 @@ func (wfa *WorkflowMongoAccessor) execution(realData *Workflow, delete bool) (in
|
||||
if delete {
|
||||
mongo.MONGOService.DeleteMultiple(map[string]interface{}{
|
||||
"workflow_id": realData.UUID,
|
||||
}, wfa.GetType())
|
||||
}, utils.WORKFLOW_EXECUTION.String())
|
||||
}
|
||||
if realData.Schedule != nil {
|
||||
accessor := workflow_execution.WorkflowExecutionMongoAccessor{}
|
||||
accessor := (&workflow_execution.WorkflowExecution{}).GetAccessor()
|
||||
if realData.Schedule.Start.IsZero() {
|
||||
return 422, errors.New("should get a start date on the scheduler.")
|
||||
}
|
||||
@ -94,7 +94,7 @@ func (wfa *WorkflowMongoAccessor) LoadOne(id string) (utils.DBObject, int, error
|
||||
}
|
||||
res_mongo.Decode(&workflow)
|
||||
// add to workspace
|
||||
access := workspace.WorkspaceMongoAccessor{}
|
||||
access := (&workspace.Workspace{}).GetAccessor()
|
||||
ws, _, err := mongo.MONGOService.LoadFilter(map[string]interface{}{
|
||||
"active": true,
|
||||
}, utils.WORKSPACE.String())
|
||||
|
@ -56,7 +56,7 @@ func (wfa *WorkspaceMongoAccessor) LoadOne(id string) (utils.DBObject, int, erro
|
||||
wfa.UpdateOne(obj, id)
|
||||
|
||||
if workflow.Datas != nil && len(workflow.Datas) > 0 {
|
||||
dataAccessor := &data.DataMongoAccessor{}
|
||||
dataAccessor := (&data.DataResource{}).GetAccessor()
|
||||
for _, id := range workflow.Datas {
|
||||
d, _, e := dataAccessor.LoadOne(id)
|
||||
if e == nil {
|
||||
@ -65,7 +65,7 @@ func (wfa *WorkspaceMongoAccessor) LoadOne(id string) (utils.DBObject, int, erro
|
||||
}
|
||||
}
|
||||
if workflow.Datacenters != nil && len(workflow.Datacenters) > 0 {
|
||||
dataAccessor := &datacenter.DatacenterMongoAccessor{}
|
||||
dataAccessor := (&datacenter.DatacenterResource{}).GetAccessor()
|
||||
for _, id := range workflow.Datacenters {
|
||||
d, _, e := dataAccessor.LoadOne(id)
|
||||
if e == nil {
|
||||
@ -74,7 +74,7 @@ func (wfa *WorkspaceMongoAccessor) LoadOne(id string) (utils.DBObject, int, erro
|
||||
}
|
||||
}
|
||||
if workflow.Storages != nil && len(workflow.Storages) > 0 {
|
||||
dataAccessor := &storage.StorageMongoAccessor{}
|
||||
dataAccessor := (&storage.StorageResource{}).GetAccessor()
|
||||
for _, id := range workflow.Storages {
|
||||
d, _, e := dataAccessor.LoadOne(id)
|
||||
if e == nil {
|
||||
@ -83,7 +83,7 @@ func (wfa *WorkspaceMongoAccessor) LoadOne(id string) (utils.DBObject, int, erro
|
||||
}
|
||||
}
|
||||
if workflow.Processings != nil && len(workflow.Processings) > 0 {
|
||||
dataAccessor := &processing.ProcessingMongoAccessor{}
|
||||
dataAccessor := (&processing.ProcessingResource{}).GetAccessor()
|
||||
for _, id := range workflow.Processings {
|
||||
d, _, e := dataAccessor.LoadOne(id)
|
||||
if e == nil {
|
||||
@ -92,7 +92,7 @@ func (wfa *WorkspaceMongoAccessor) LoadOne(id string) (utils.DBObject, int, erro
|
||||
}
|
||||
}
|
||||
if workflow.Workflows != nil && len(workflow.Workflows) > 0 {
|
||||
dataAccessor := &w.WorkflowResourceMongoAccessor{}
|
||||
dataAccessor := (&w.WorkflowResource{}).GetAccessor()
|
||||
for _, id := range workflow.Workflows {
|
||||
d, _, e := dataAccessor.LoadOne(id)
|
||||
if e == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user