Celery 2.0 Documentation- celery.signals Exceptions - celery.exceptions Built-in Task Classes - celery.task.builtins Loaders - celery.loaders Loader Base Classes - celery.loaders.base Default Loader - celery.loaders.default Task from celery.decorators import task @task def add(x, y): return x + y All celery tasks are classes that inherit from the Task class. In this case we’re using a decorator that wraps the add function an appropriate class for us automatically. The full documentation on how to create tasks and task classes is in the Tasks part of the user guide. Configuration Celery is configured by using a configuration0 码力 | 284 页 | 332.71 KB | 1 年前3
Celery 2.0 Documentationpy: from celery.decorators import task @task def add(x, y): return x + y All celery tasks are classes that inherit from the Task class. In this case we’re using a decorator that wraps the add function an appropriate class for us automatically. The full documentation on how to create tasks and task classes is in the Tasks part of the user guide. 1.3.2 Configuration Celery is configured by using a configuration service enables you to schedule tasks to run at intervals. Periodic tasks are defined as special task classes. Here’s an example of a periodic task: from celery.decorators import periodic_task from datetime0 码力 | 165 页 | 492.43 KB | 1 年前3
Celery 1.0 Documentation- celery.signals Exceptions - celery.exceptions Built-in Task Classes - celery.task.builtins Loaders - celery.loaders Loader Base Classes - celery.loaders.base Default Loader - celery.loaders.default Django from celery.decorators import task @task def add(x, y): return x + y All celery tasks are classes that inherit from the Task class. In this case we’re using a decorator that wraps the add function an appropriate class for us automatically. The full documentation on how to create tasks and task classes are in Executing Tasks. Configuration Celery is configured by using a configuration module. By0 码力 | 221 页 | 283.64 KB | 1 年前3
Celery 2.5 Documentationcreate custom task classes when you want to change generic behavior, and use the decorator to define tasks. See also: The full documentation on how to create tasks and task classes is in the Tasks part REVOKED – Custom states – Creating pickleable exceptions • Creating custom task classes – Instantiation – Abstract classes – Handlers * on_retry • How it works • Tips and Best Practices – Ignore results automatically generated using the module and class name. See Task names. Task.abstract Abstract classes are not registered, but are used as the base class for new task types. Task.max_retries The maximum0 码力 | 400 页 | 1.40 MB | 1 年前3
Celery 2.5 Documentationcreate custom task classes when you want to change generic behavior, and use the decorator to define tasks. See also The full documentation on how to create tasks and task classes is in the Tasks part task if something fails Task options Task names Decorating tasks Task States Creating custom task classes How it works Tips and Best Practices Performance and Strategies Example Executing Tasks Basics RETRY REVOKED Custom states Creating pickleable exceptions Creating custom task classes Instantiation Abstract classes Handlers on_retry How it works Tips and Best Practices Ignore results you don’t0 码力 | 647 页 | 1011.88 KB | 1 年前3
Celery 2.3 Documentationcreate custom task classes when you want to change generic behavior, and use the decorator to define tasks. See also: The full documentation on how to create tasks and task classes is in the Tasks part * SUCCESS * FAILURE * RETRY * REVOKED – Custom states • Creating custom task classes – Instantiation – Abstract classes – Handlers * on_retry • How it works • Tips and Best Practices – Ignore results name. See Task names. 2.2. Tasks 17 Celery Documentation, Release 2.3.5 Task.abstract Abstract classes are not registered, but are used as the base class for new task types. Task.max_retries The maximum0 码力 | 334 页 | 1.25 MB | 1 年前3
Celery 3.1 Documentationapp yet. Concrete subclasses of this class will be bound, so you should always mark generic base classes as abstract Once a task is bound to an app it will read configuration to set default values and • Context • Logging • Retrying • List of Options • States • Semipredicates • Custom task classes • How it works • Tips and Best Practices • Performance and Strategies • Example Basics You about the current request. Thread local storage is used. See Context. Task.abstract Abstract classes are not registered, but are used as the base class for new task types. Task.max_retries The maximum0 码力 | 607 页 | 2.27 MB | 1 年前3
Celery 3.1 Documentationapp yet. Concrete subclasses of this class will be bound, so you should always mark generic base classes as abstract Once a task is bound to an app it will read configuration to set default values and first in the list): @app.task @decorator2 @decorator1 def add(x, y): return x + y Custom task classes How it works Tips and Best Practices Performance and Strategies Example Basics You can easily create about the current request. Thread local storage is used. See Context. Task.abstract Abstract classes are not registered, but are used as the base class for new task types. Task.max_retries The maximum0 码力 | 887 页 | 1.22 MB | 1 年前3
Celery 2.1 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.13 Built-in Task Classes - celery.task.builtins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 9.15 Loader Base Classes - celery.loaders.base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 9.16 Default py from celery.decorators import task @task def add(x, y): return x + y All Celery tasks are classes that inherits from the Task class. In this example we’re using a decorator that wraps the add function0 码力 | 285 页 | 1.19 MB | 1 年前3
Celery 2.1 Documentation- celery.signals Exceptions - celery.exceptions Built-in Task Classes - celery.task.builtins Loaders - celery.loaders Loader Base Classes - celery.loaders.base Default Loader - celery.loaders.default Task from celery.decorators import task @task def add(x, y): return x + y All Celery tasks are classes that inherits from the Task class. In this example we’re using a decorator that wraps the add function appropriate class for us automatically. See also The full documentation on how to create tasks and task classes is in the Tasks part of the user guide. Configuration Celery is configured by using a configuration0 码力 | 463 页 | 861.69 KB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6













