mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-02-16 00:19:32 -06:00
Fixes handling the case where there is no status reported from celery (due to external termination of the worker) (#12040)
This commit is contained in:
@@ -936,7 +936,7 @@ def task_postrun_handler(
|
||||
task_instance = PaperlessTask.objects.filter(task_id=task_id).first()
|
||||
|
||||
if task_instance is not None:
|
||||
task_instance.status = state
|
||||
task_instance.status = state or states.FAILURE
|
||||
task_instance.result = retval
|
||||
task_instance.date_done = timezone.now()
|
||||
task_instance.save()
|
||||
|
||||
Reference in New Issue
Block a user