Skip to content

Commit

Permalink
Fixed some failover issues with auth/exec id for subflows
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Sep 25, 2023
1 parent 0617a78 commit 06d68ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shuffle-subflow/1.0.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
else:
print("No startnode")

if len(self.full_execution["execution_id"]) > 0 and self.full_execution["execution_id"] != source_execution:
params["source_execution"] = self.full_execution["execution_id"]

if len(self.full_execution["authorization"]) > 0 and self.full_execution["authorization"] != source_auth:
params["source_auth"] = self.full_execution["authorization"]

if len(str(backend_url)) > 0:
url = "%s/api/v1/workflows/%s/execute" % (backend_url, workflow)
print("[INFO] Changed URL to %s for this execution" % url)
Expand Down
6 changes: 6 additions & 0 deletions shuffle-subflow/1.1.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
else:
print("No startnode")

if len(self.full_execution["execution_id"]) > 0 and self.full_execution["execution_id"] != source_execution:
params["source_execution"] = self.full_execution["execution_id"]

if len(self.full_execution["authorization"]) > 0 and self.full_execution["authorization"] != source_auth:
params["source_auth"] = self.full_execution["authorization"]

if len(str(backend_url)) > 0:
url = "%s/api/v1/workflows/%s/execute" % (backend_url, workflow)
print("[INFO] Changed URL to %s for this execution" % url)
Expand Down

0 comments on commit 06d68ee

Please sign in to comment.