This document describes the current stable version of Celery (4.4). For development docs, go here.
celery.contrib.testing.worker¶
API Reference¶
Embedded workers for integration tests.
-
class
celery.contrib.testing.worker.TestWorkController(*args: Any, **kwargs: Any)[source]¶ Worker that can synchronize on being fully started.
-
ensure_started() → None[source]¶ Wait for worker to be fully up and running.
Warning
Worker must be started within a thread for this to work, or it will block forever.
-
on_consumer_ready(consumer: celery.worker.consumer.Consumer) → None[source]¶ Callback called when the Consumer blueprint is fully started.
-