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

MyCelery.AsyncResult

Create new result instance.

MyCelery.Beat

celery beat scheduler application.

MyCelery.GroupResult

Create new group result instance.

MyCelery.IS_WINDOWS

MyCelery.IS_macOS

MyCelery.ResultSet

MyCelery.SYSTEM

MyCelery.Task

Base task class for this app.

MyCelery.WorkController

Embeddable worker.

MyCelery.Worker

Worker application.

MyCelery.amqp

@amqp.

MyCelery.amqp_cls

MyCelery.annotations

MyCelery.backend

Current backend instance.

MyCelery.backend_cls

MyCelery.builtin_fixups

MyCelery.conf

Current configuration.

MyCelery.control

@control.

MyCelery.control_cls

MyCelery.current_task

Instance of task being executed, or None.

MyCelery.current_worker_task

The task currently being executed by a worker or None.

MyCelery.events

@events.

MyCelery.events_cls

MyCelery.loader

Current loader instance.

MyCelery.loader_cls

MyCelery.log

@log.

MyCelery.log_cls

MyCelery.main

Name of the __main__ module.

MyCelery.oid

Universally unique identifier for this app.

MyCelery.on_after_configure

Signal sent after app has prepared the configuration.

MyCelery.on_after_finalize

Signal sent after app has been finalized.

MyCelery.on_after_fork

Signal sent by every new process after fork.

MyCelery.on_configure

Signal sent when app is loading configuration.

MyCelery.pool

@pool.

MyCelery.producer_pool

MyCelery.registry_cls

MyCelery.steps

Custom bootsteps to extend and modify the worker.

MyCelery.task_cls

MyCelery.tasks

Task registry.

MyCelery.thread_oid

Per-thread unique identifier for this app.

MyCelery.timezone

Current timezone for this app.

MyCelery.user_options

Custom options for command-line programs.

Methods

MyCelery.__init__([main, loader, backend, ...])

MyCelery.add_defaults(fun)

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.

MyCelery.bugreport()

Return information useful in bug reports.

MyCelery.close()

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.

MyCelery.connection_for_write([url])

Establish connection used for producing.

MyCelery.connection_or_acquire([connection, ...])

Context used to acquire a connection from the pool.

MyCelery.create_task_cls()

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.

MyCelery.now()

Return the current time and date as a datetime.

MyCelery.on_init()

Optional callback called at init.

MyCelery.prepare_config(c)

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.

MyCelery.set_current()

Make this the current app for this thread.

MyCelery.set_default()

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.

MyCelery.uses_utc_timezone()

Check if the application uses the UTC timezone.

MyCelery.worker_main([argv])

Run celery worker using argv.