Skip to content

fix: non-blocking status endpoint

Paulo Viadanna requested to merge viadanna/fix-blocking-status into main

Description

This MR implements a check and quick timeout on the /status endpoint to prevent blocking the process when fetching nonexistent results.

It also improved error handling in tasks so that exceptions don't cause confusion regarding what happened to a task.

Testing instructions

  1. Set this version of clone-course on a devstack, sandbox, or make use of https://studio.lms.paulo.eshe.opencraft.hosting/
  2. Request the /clone_course/status endpoint with a nonexistent id.
  3. Ensure it returns correctly in a timely manner.
  4. Request /clone_course/clone with an inexistent source course ID and take note of the task ID.
  5. Request the status endpoint to query the results of the above request.
  6. Ensure the validation error is properly explained in the results.
Edited by Paulo Viadanna

Merge request reports