Subscribes to Celery’s worker_process_init signal so every prefork worker calls snitchbot.init() exactly once after fork. Each worker registers as a distinct client in the live dashboard.

Signature

def install(celery_app, *, service: str, **init_kwargs: Any) -> None

Parameters

NameTypeDescriptionDefault
celery_appcelery.CeleryYour Celery application instance. The argument is currently unused (the helper subscribes to a global Celery signal); it is accepted for forward compatibility.required
servicestrForwarded to snitchbot.init as the first positional argument.required
**init_kwargsAnyForwarded verbatim to snitchbot.init. role defaults to "worker"; pass an explicit role to override.

Example

from celery import Celery
from snitchbot.integrations.celery import install

app = Celery("tasks", broker="redis://...")
install(app, service="my-worker")