Skip to content

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

@vdaluz

Description

@vdaluz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions