makeplane / makeplane/plane

[Bug] logger_task not registered in Celery worker — process_logs tasks silently dropped

Open Beginner friendly
#8,928 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Description

plane.bgtasks.logger_task.process_logs is queued by plane-api on every API request (audit logging via APITokenLogMiddleware), but the Celery worker discards every message with a KeyError because the module is not listed in CELERY_IMPORTS.

Root cause

plane/bgtasks/logger_task.py exists and defines a @shared_task, but it was never added to CELERY_IMPORTS in plane/settings/common.py when the module was introduced in #8245.

The worker only loads modules listed in CELERY_IMPORTS, so process_logs is never registered.

Impact

  • API activity logs are not saved (audit trail broken for APIActivityLog / MongoDB logging)
  • ~1 error per API call in the worker logs (depending on traffic, tens to hundreds per hour)
  • All other Plane functionality works normally

Error in worker logs

Received unregistered task of type 'plane.bgtasks.logger_task.process_logs'.
The message has been ignored and discarded.

Did you remember to import the module containing this task?

Traceback (most recent call last):
  File ".../celery/worker/consumer/consumer.py", line 659, in on_task_received
    strategy = strategies[type_]
               ~~~~~~~~~~^^^^^^^
KeyError: 'plane.bgtasks.logger_task.process_logs'

Fix

Add "plane.bgtasks.logger_task" to CELERY_IMPORTS in plane/settings/common.py.

A one-line fix is ready in a PR.

Versions

  • plane-backend:stable (digest sha256:60fb33fa...)
  • Confirmed present in both main and preview branches as of April 2026

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in plane/settings/common.py by inspecting CELERY_IMPORTS, then compare it with the task defined in plane/bgtasks/logger_task.py. Confirm that the worker registers plane.bgtasks.logger_task.process_logs and that API activity logs are no longer discarded; the issue does not name a specific test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.