Async workflow trigger log stuck in PENDING when Celery dispatch fails
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start at AsyncWorkflowService.trigger_workflow_async and compare its dispatch-failure path with the quota-exceeded path, which already updates the trigger log before re-raising. Review get_failed_logs_for_retry and reinvoke_trigger to understand the retry states. Done means a Celery enqueue failure leaves the log as FAILED with the dispatch error and does not remain invisibly PENDING.
Written by the indexing model from the issue text.
Description
When AsyncWorkflowService.trigger_workflow_async fails to enqueue the Celery task (e.g. broker down, execute_workflow_*_team.delay() raises), the trigger log row created just before stays in PENDING forever.
No worker will ever pick it up since the task was never queued, the quota reservation is refunded, and get_failed_logs_for_retry only surfaces FAILED/RATE_LIMITED logs — so the stuck PENDING log is invisible to the retry flow (reinvoke_trigger).
The quota-exceeded path in the same method already handles its failure correctly (marks the log RATE_LIMITED with the error and commits before re-raising). The dispatch-failure path should do the same: mark the log FAILED with the dispatch error before re-raising.
- Dominant language
- TypeScript
- Stars
- 157k
- Forks
- 24.7k
- Avg merge
- 22h 32m
- Merged PRs (30d)
- 611
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from langgenius/dify
-
Annotation Reply: a stored score threshold of 0.0 is silently replaced with 1, disabling the feature Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langgenius/dify#42639 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
langgenius/dify#42468 · 1 comment · 1 reaction ·
-
🐞 bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
langgenius/dify#42446 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langgenius/dify#42355 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langgenius/dify#42350 · 1 comment · 1 reaction ·
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100