[bug]: celery worker discards every API-request log task — plane.bgtasks.logger_task missing from CELERY_IMPORTS
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Environment
Self-hosted CE, observed on v1.2.3 and still present at the v1.3.1 tag (apps/api/plane/settings/common.py, CELERY_IMPORTS, ~line 318).
Symptom
The worker rejects and discards every API-activity-log task the api service enqueues:
[ERROR/MainProcess] Received unregistered task of type 'plane.bgtasks.logger_task.process_logs'.
The message has been ignored and discarded.
...
KeyError: 'plane.bgtasks.logger_task.process_logs'
On our modest single-workspace instance this error fired 20,000+ times in ~2 months (one per external-API request, enqueued by APITokenLogMiddleware), and the corresponding API activity logs are silently never written.
Root cause
plane.bgtasks.logger_task is not listed in CELERY_IMPORTS and is not imported transitively by anything the worker loads, so Celery never registers the task. The api process imports the module directly at the enqueue site, which is why it can happily .delay() tasks the worker then throws away.
plane.bgtasks.webhook_task is in a similar situation — it currently registers only via transitive imports, which is fragile (a refactor of the importing module would silently kill webhook delivery).
Fix
Add the modules explicitly:
CELERY_IMPORTS = (
# ... existing entries ...
"plane.bgtasks.logger_task",
"plane.bgtasks.webhook_task",
)
Verified on our instance: after adding these, process_logs tasks are consumed cleanly (hundreds processed, zero unregistered-task errors), webhook delivery unaffected.
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.
Research direction
Start in apps/api/plane/settings/common.py at CELERY_IMPORTS and inspect the existing Celery task module entries. Add the explicitly named logger_task and webhook_task modules, then verify that API activity-log tasks are consumed without unregistered-task errors and that webhook delivery remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100