Reduced execution amount to 20

This commit is contained in:
frikky
2020-07-08 01:59:52 +02:00
parent 4b2d5da2a4
commit 9c14d4e93f
2 changed files with 11 additions and 6 deletions
+2 -2
View File
@@ -1925,7 +1925,7 @@ func cleanupExecutions(resp http.ResponseWriter, request *http.Request) {
var workflowExecutions []WorkflowExecution
_, err = dbclient.GetAll(ctx, q, &workflowExecutions)
if err != nil {
log.Printf("Error getting workflowexec: %s", err)
log.Printf("Error getting workflowexec (cleanup): %s", err)
resp.WriteHeader(401)
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Failed getting all workflowexecutions"}`)))
return
@@ -4404,7 +4404,7 @@ func getWorkflowExecutions(resp http.ResponseWriter, request *http.Request) {
}
// Query for the specifci workflowId
q := datastore.NewQuery("workflowexecution").Filter("workflow_id =", fileId).Order("-started_at").Limit(50)
q := datastore.NewQuery("workflowexecution").Filter("workflow_id =", fileId).Order("-started_at").Limit(20)
var workflowExecutions []WorkflowExecution
_, err = dbclient.GetAll(ctx, q, &workflowExecutions)
if err != nil {