From 91128313fc9509e8242b40912ff4a8acd5813c40 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 3 Oct 2024 17:13:50 +0200 Subject: [PATCH] add workflow func tools --- models/workflow/workflow.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/models/workflow/workflow.go b/models/workflow/workflow.go index 17f3b43..19f7fa1 100644 --- a/models/workflow/workflow.go +++ b/models/workflow/workflow.go @@ -26,24 +26,6 @@ type AbstractWorkflow struct { Shared []string `json:"shared,omitempty" bson:"shared,omitempty"` // Shared is the ID of the shared workflow } -func (w AbstractWorkflow) isADependancy(id string) (bool, []string) { - dependancyOfIDs := []string{} - isDeps := false - for _, link := range w.Graph.Links { - source := w.Graph.Items[link.Destination.ID].Processing - if id == link.Source.ID && source != nil { - isDeps = true - dependancyOfIDs = append(dependancyOfIDs, link.Destination.ID) - } - wourceWF := w.Graph.Items[link.Destination.ID].Workflow - if id == link.Source.ID && wourceWF != nil { - isDeps = true - dependancyOfIDs = append(dependancyOfIDs, link.Destination.ID) - } - } - return isDeps, dependancyOfIDs -} - func (w *AbstractWorkflow) GetStoragesByRelatedProcessing(processingID string, relatedToData bool, ignoreRelation bool) (map[string][]utils.DBObject, map[string]map[string][]utils.DBObject) { storages := make(map[string][]utils.DBObject) datasRelatedToStorage := make(map[string]map[string][]utils.DBObject)