app.celery.MyCelery
- class app.celery.MyCelery(main=None, loader=None, backend=None, amqp=None, events=None, log=None, control=None, set_as_current=True, tasks=None, broker=None, include=None, changes=None, config_source=None, fixups=None, task_cls=None, autofinalize=True, namespace=None, strict_typing=True, **kwargs)
Bases:
celery.app.base.Celery
Attributes
Create new result instance.
celery beat scheduler application.
Create new group result instance.
Base task class for this app.
Embeddable worker.
Worker application.
@amqp
.Current backend instance.
Current configuration.
@control
.Instance of task being executed, or
None
.The task currently being executed by a worker or
None
.@events
.Current loader instance.
@log
.Name of the __main__ module.
Universally unique identifier for this app.
Signal sent after app has prepared the configuration.
Signal sent after app has been finalized.
Signal sent by every new process after fork.
Signal sent when app is loading configuration.
@pool
.Custom bootsteps to extend and modify the worker.
Task registry.
Per-thread unique identifier for this app.
Current timezone for this app.
Custom options for command-line programs.
Methods
MyCelery.__init__
([main, loader, backend, ...])Add default configuration from dict
d
.MyCelery.add_periodic_task
(schedule, sig[, ...])MyCelery.autodiscover_tasks
([packages, ...])Auto-discover task modules.
MyCelery.broker_connection
([hostname, ...])Establish a connection to the message broker.
Return information useful in bug reports.
Clean up after the application.
MyCelery.config_from_cmdline
(argv[, namespace])MyCelery.config_from_envvar
(variable_name[, ...])Read configuration from environment variable.
MyCelery.config_from_object
(obj[, silent, ...])Read configuration from object.
MyCelery.connection
([hostname, userid, ...])Establish a connection to the message broker.
MyCelery.connection_for_read
([url])Establish connection used for consuming.
Establish connection used for producing.
MyCelery.connection_or_acquire
([connection, ...])Context used to acquire a connection from the pool.
Create a base task class bound to this app.
MyCelery.default_connection
([connection, pool])Context used to acquire a connection from the pool.
MyCelery.default_producer
([producer])Context used to acquire a producer from the pool.
MyCelery.either
(default_key, *defaults)Get key from configuration or use default values.
MyCelery.finalize
([auto])Finalize the app.
MyCelery.gen_task_name
(name, module)New task default automatic naming.
Return the current time and date as a datetime.
Optional callback called at init.
Prepare configuration before it is merged with the defaults.
MyCelery.producer_or_acquire
([producer])Context used to acquire a producer from the pool.
MyCelery.register_task
(task, **options)Utility for registering a task-based class.
MyCelery.select_queues
([queues])Select subset of queues.
MyCelery.send_task
(name[, args, kwargs, ...])Send task by name.
Make this the current app for this thread.
Make this the default app for all threads.
MyCelery.setup_security
([...])Setup the message-signing serializer.
MyCelery.signature
(*args, **kwargs)Return a new
Signature
bound to this app.MyCelery.start
([argv])Run celery using argv.
MyCelery.subclass_with_self
(Class[, name, ...])Subclass an app-compatible class.
MyCelery.task
(*args, **opts)Decorator to create a task class out of any callable.
Check if the application uses the UTC timezone.
MyCelery.worker_main
([argv])Run celery worker using argv.