devilry / devilry-django

Devilry project main repository
http://devilry.org
BSD 3-Clause "New" or "Revised" License
51 stars 24 forks source link

RQ Worker timeout doesn't yield an error #1310

Open torgeirl opened 2 months ago

torgeirl commented 2 months ago

If a batchframework_admin_compress_assignment operation fails due to a timeout caused by the task to build a Tar archive file exceeding the timeout set by RQ_QUEUES['default']['DEFAULT_TIMEOUT'], the failure is only reflected by the status in the Django admin UI.

Status: finished
Result: failed
Output: 
{"actiongroup_name": "batchframework_admin_compress_assignment",
  "results": [{
    "action_name": "devilry.devilry_admin.tasks.AssignmentCompressAction",
    "failed": true, "errordata": {
      "data": "An HTTP Client raised an unhandled exception: Task exceeded maximum timeout value (500 seconds)"
      ...

The timeout does not yield an error (so it could be detected by Sentry), and the RQ worker itself just logs «Job OK»:

[INFO] rq.worker: default: ievv_opensource.ievv_batchframework.rq_tasks.default(
    actiongroup_name='batchframework_admin_compress_assignment',
    batchoperation_id=<batch-operation-ID>,
    operationtype='batchframework_admin_compress_assignment') (<job-hash>)
[INFO] rq.worker: default: Job OK (<job-hash>)