Celery 4.0 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1042 页 | 1.37 MB | 1 年前3
Celery v4.0.1 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1040 页 | 1.37 MB | 1 年前3
Celery v4.0.2 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1042 页 | 1.37 MB | 1 年前3
Celery v4.1.0 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1057 页 | 1.35 MB | 1 年前3
Celery v4.2.2 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1121 页 | 1.38 MB | 1 年前3
Celery v4.2.1 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1121 页 | 1.38 MB | 1 年前3
Celery v4.2.1 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' [Configuration] -- * - **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 746 页 | 2.73 MB | 1 年前3
Celery v4.2.2 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' [Configuration] -- * - **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 744 页 | 2.71 MB | 1 年前3
Celery v4.2.0 Documentationsee Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority' **** --- . broker: amqp://guest@localhost:5672// - ** ---------- . app: __main__:0x1012d8590 - ** ---------- . concurrency: 8 (processes) - ** ---------- . events: OFF (enable -E to monitor 2) >>> res.get(timeout=1) 4 You can find the task’s id by looking at the id attribute: >>> res.id d6b3aea2-fb9b-4ebc-8da4-848818db9114 You can also inspect the exception and traceback if the task raised0 码力 | 1110 页 | 1.36 MB | 1 年前3
Celery v4.4.5 Documentationsudo apt-get install rabbitmq-server Or, if you want to run it on Docker execute this: $ docker run -d -p 5672:5672 rabbitmq When the command completes, the broker will already be running in the background information about using Redis: Using Redis If you want to run it on Docker execute this: $ docker run -d -p 6379:6379 redis Other brokers In addition to the above, there are other experimental transport see Configuration and defaults. To demonstrate the power of configuration files, this is how you’d route a misbehaving task to a dedicated queue: celeryconfig.py: task_routes = { 'tasks.add': 'low-priority'0 码力 | 1215 页 | 1.44 MB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6













