#398: Added priorities to executions
This commit is contained in:
@@ -922,6 +922,7 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
//log.Printf("Execution request: %#v", executionRequest)
|
//log.Printf("Execution request: %#v", executionRequest)
|
||||||
|
executionRequest.Priority = workflowExecution.Priority
|
||||||
err = shuffle.SetWorkflowQueue(ctx, executionRequest, environment)
|
err = shuffle.SetWorkflowQueue(ctx, executionRequest, environment)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] Failed adding execution to db: %s", err)
|
log.Printf("[ERROR] Failed adding execution to db: %s", err)
|
||||||
@@ -2577,6 +2578,7 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workflowExecution.Priority = 10
|
||||||
environments, err := shuffle.GetEnvironments(ctx, user.ActiveOrg.Id)
|
environments, err := shuffle.GetEnvironments(ctx, user.ActiveOrg.Id)
|
||||||
environment := "Shuffle"
|
environment := "Shuffle"
|
||||||
if len(environments) >= 1 {
|
if len(environments) >= 1 {
|
||||||
@@ -2597,6 +2599,7 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) {
|
|||||||
Environments: []string{environment},
|
Environments: []string{environment},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
executionRequest.Priority = workflowExecution.Priority
|
||||||
err = shuffle.SetWorkflowQueue(ctx, executionRequest, environment)
|
err = shuffle.SetWorkflowQueue(ctx, executionRequest, environment)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] Failed adding execution to db: %s", err)
|
log.Printf("[ERROR] Failed adding execution to db: %s", err)
|
||||||
|
|||||||
@@ -1855,6 +1855,7 @@ const AngularWorkflow = (props) => {
|
|||||||
const nodedata = event.target.data();
|
const nodedata = event.target.data();
|
||||||
if (nodedata.finished === false) {
|
if (nodedata.finished === false) {
|
||||||
console.log("NOT FINISHED - ADD EXAMPLE BRANCHES TO CLOSEST!!")
|
console.log("NOT FINISHED - ADD EXAMPLE BRANCHES TO CLOSEST!!")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nodedata.app_name !== undefined) {
|
if (nodedata.app_name !== undefined) {
|
||||||
@@ -2282,14 +2283,14 @@ const AngularWorkflow = (props) => {
|
|||||||
(a) => a.id === data.id
|
(a) => a.id === data.id
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("Trigger: ", data, trigger_index)
|
//console.log("Trigger: ", data, trigger_index)
|
||||||
if (trigger_index === -1) {
|
if (trigger_index === -1) {
|
||||||
workflow.triggers.push(data)
|
workflow.triggers.push(data)
|
||||||
trigger_index = workflow.triggers.length-1
|
trigger_index = workflow.triggers.length-1
|
||||||
setWorkflow(workflow)
|
setWorkflow(workflow)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Trigger2: ", data, trigger_index)
|
//console.log("Trigger2: ", data, trigger_index)
|
||||||
//if (data.id !== undefined && data.app_name !== undefined) {
|
//if (data.id !== undefined && data.app_name !== undefined) {
|
||||||
// //newapps.push(data)
|
// //newapps.push(data)
|
||||||
// workflow.actions.push(data)
|
// workflow.actions.push(data)
|
||||||
@@ -3553,9 +3554,9 @@ const AngularWorkflow = (props) => {
|
|||||||
const nodedata = event.target.data();
|
const nodedata = event.target.data();
|
||||||
|
|
||||||
//console.log("NODE: ", nodedata)
|
//console.log("NODE: ", nodedata)
|
||||||
//if (nodedata.finished === false) {
|
if (nodedata.finished === false) {
|
||||||
// return;
|
return;
|
||||||
//}
|
}
|
||||||
|
|
||||||
//var parentNode = cy.$("#" + event.target.data("id"));
|
//var parentNode = cy.$("#" + event.target.data("id"));
|
||||||
//if (parentNode.data("isButton") || parentNode.data("buttonId")) return;
|
//if (parentNode.data("isButton") || parentNode.data("buttonId")) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user