Skip to content

Commit adb6b8c

Browse files
committed
Check if workflow already exists before creating during cache update
1 parent 5f81d9a commit adb6b8c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/commonwl/view/workflow/WorkflowService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ public Workflow getWorkflow(GitDetails gitInfo) {
181181
// TODO: Separate concept of commit from branch ref, see #164
182182
GitDetails byOldCommitId = workflow.getRetrievedFrom();
183183
byOldCommitId.setBranch(workflow.getLastCommit());
184-
createQueuedWorkflow(byOldCommitId);
184+
if (getQueuedWorkflow(byOldCommitId) == null
185+
&& getWorkflow(byOldCommitId) == null) {
186+
createQueuedWorkflow(byOldCommitId);
187+
}
185188

186189
workflow = null;
187190
} catch (Exception e) {

0 commit comments

Comments
 (0)