This document describes the current stable version of Celery (4.0).
For development docs,
go here.
celery.contrib.testing.worker
Embedded workers for integration tests.
-
class
celery.contrib.testing.worker.
TestWorkController
(*args, **kwargs)[source]
Worker that can synchronize on being fully started.
-
ensure_started
()[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)[source]
Callback called when the Consumer blueprint is fully started.
-
celery.contrib.testing.worker.
setup_app_for_worker
(app, loglevel, logfile)[source]
Setup the app to be used for starting an embedded worker.
-
celery.contrib.testing.worker.
start_worker
(*args, **kwds)[source]
Start embedded worker.
Yields: | celery.app.worker.Worker – worker instance. |