Celery 2.3 DocumentationDocumentation, Release 2.3.5 2.2.1 Basics A task is a class that encapsulates a function and its execution options. Given a function create_user‘, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 334 页 | 1.25 MB | 1 年前3
Celery 2.2 Documentationsee the API reference. 2.2.1 Basics A task is a class that encapsulates a function and its execution options. Given a function create_user‘, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 314 页 | 1.26 MB | 1 年前3
Celery 2.2 Documentationplease see the API reference. Basics A task is a class that encapsulates a function and its execution options. Given a function create_user`, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 505 页 | 878.66 KB | 1 年前3
Celery 2.5 Documentationsee the API reference. 2.2.1 Basics A task is a class that encapsulates a function and its execution options. Given a function create_user‘, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: 2.3. Executing Tasks 37 Celery Documentation, Release 2.5.5 Task.delay(arg1, arg2, kwarg1="x"0 码力 | 400 页 | 1.40 MB | 1 年前3
Celery 2.3 Documentationplease see the API reference. Basics A task is a class that encapsulates a function and its execution options. Given a function create_user`, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 530 页 | 900.64 KB | 1 年前3
Celery 2.4 Documentationplease see the API reference. Basics A task is a class that encapsulates a function and its execution options. Given a function create_user`, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 543 页 | 957.42 KB | 1 年前3
Celery 2.4 Documentationsee the API reference. 2.2.1 Basics A task is a class that encapsulates a function and its execution options. Given a function create_user‘, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 395 页 | 1.54 MB | 1 年前3
Celery 2.5 Documentationplease see the API reference. Basics A task is a class that encapsulates a function and its execution options. Given a function create_user`, that takes two arguments: username and password, you can create registered, but any task inheriting from it will be. When tasks are sent, we don’t send any actual function code, just the name of the task to execute. When the worker then receives the message it can look and the shortcut: delay(). delay is simple and convenient, as it looks like calling a regular function: Task.delay(arg1, arg2, kwarg1="x", kwarg2="y") The same using apply_async is written like this:0 码力 | 647 页 | 1011.88 KB | 1 年前3
Celery 3.1 Documentationwant to pass the signature of a task invocation to another process or as an argument to another function, for this Celery uses something called subtasks. A subtask wraps the arguments and execution options to see what the workers are doing: $ celery -A proj events --dump or you can start the curses interface: $ celery -A proj events when you’re finished monitoring you can disable events again: $ celery add> and there you see that __main__ again; whenever Celery is not able to detect what module the function belongs to, it uses the main module name to generate the beginning of the task name. This is only0 码力 | 887 页 | 1.22 MB | 1 年前3
Celery 3.1 Documentationwant to pass the signature of a task invocation to another process or as an argument to another function, for this Celery uses something called subtasks. A subtask wraps the arguments and execution options to see what the workers are doing: $ celery -A proj events --dump or you can start the curses interface: $ celery -A proj events when you’re finished monitoring you can disable events again: $ celery add> and there you see that __main__ again; whenever Celery is not able to detect what module the function belongs to, it uses the main module name to generate the beginning of the task name. This is only0 码力 | 607 页 | 2.27 MB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6













