Added debug info for bug with workflow deletions

This commit is contained in:
frikky
2021-07-30 19:53:13 +02:00
parent 4010258c37
commit 575b0bb297
5 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -1190,12 +1190,12 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
// FIXME - maybe delete workflow executions
err = shuffle.DeleteKey(ctx, "workflow", fileId)
if err != nil {
log.Printf("Failed deleting key %s", fileId)
log.Printf("[DEBUG]] Failed deleting key %s", fileId)
resp.WriteHeader(401)
resp.Write([]byte(`{"success": false, "reason": "Failed deleting key"}`))
return
}
log.Printf("[INFO] Should have deleted workflow %s", fileId)
log.Printf("[INFO] Should have deleted workflow %s (%s)", workflow.Name, fileId)
//memcacheName := fmt.Sprintf("%s_%s", user.Username, fileId)
//memcache.Delete(ctx, memcacheName)
@@ -1204,6 +1204,7 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
//cacheKey := fmt.Sprintf("%s_workflows", user.Id)
cacheKey := fmt.Sprintf("%s_workflows", user.Id)
shuffle.DeleteCache(ctx, cacheKey)
log.Printf("[DEBUG] Cleared workflow cache for %s (%s)", user.Username, user.Id)
resp.WriteHeader(200)
resp.Write([]byte(`{"success": true}`))