ccsync icon indicating copy to clipboard operation
ccsync copied to clipboard

Absence of failure handling mechanism while processing tasks from Job Queue

Open whyankush07 opened this issue 1 year ago • 1 comments

Describe the bug Currently, there appears to be a gap in error handling - while job failures are logged server-side, there's no direct mechanism to notify the frontend of failures that occur during async job processing. The frontend only knows if the job was successfully queued (via HTTP 202 Accepted) but not if it actually completed successfully.

Expected behavior When the add-task API is called, the a new Job is added with Job Name and Executable function to the Job Queue and a response of 202 gets returned. If somehow this task fails while executing it from Job Queue, there is no recovery system to notify the user that the task was not added specifically with this API's mechanism.

Additionally, sync-task API (default /tasks) also return follow the same pattern and returns 202 status code immediately. Neither has a way to notify frontend of job completion/failure

Screenshots image image image

whyankush07 avatar Jan 14 '25 04:01 whyankush07

Fixed with PR #71

its-me-abhishek avatar Jan 15 '25 12:01 its-me-abhishek