Commit graph

9 commits

Author SHA1 Message Date
Tang Vu
d2e34be0f6 refactor: celery task result endpoint crashes on task failure
When a Celery task fails, `result.ready()` evaluates to `True` but `result.successful()` is `False`. 
Calling `result.get()` without `propagate=False` on a failed task will re-raise the task's exception, causing the Flask endpoint to crash with a 500 Internal Server Error instead of returning the task's failed status. 
Additionally, if `result.result` is an Exception object, returning it directly in the dictionary will cause a `TypeError` during JSON serialization.


Affected files: views.py

Signed-off-by: Tang Vu <vuminhtang2212@gmail.com>
2026-03-28 04:19:28 +07:00
David Lord
a9b99b3489
update example project metadata 2024-11-01 18:00:39 -07:00
David Lord
54e05a2824
use ruff linter and formatter 2023-11-15 12:14:37 -08:00
David Lord
46b328854a
switch examples to flit 2023-06-27 14:13:56 -07:00
David Lord
ca12e8ebb7
update dependencies 2023-05-02 07:17:52 -07:00
David Lord
2e8fe7b2f2
drop support for python 3.7 2023-04-20 11:09:55 -07:00
David Lord
736b5f9ff8
update dependencies 2023-02-23 15:58:21 -08:00
David Lord
24df8fc89d
show 'run --debug' in docs
Reverts commit 4d69165ab6. Now that a
release has this option, it's ok to show it in the docs. It had been
reverted because the 2.2.x docs showed it before 2.2.3 was released.
2023-02-15 14:33:32 -08:00
David Lord
3f195248dc
add celery example 2023-02-10 09:16:53 -08:00