Celery 2.0 Documentation"priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": task being processed: [INFO/MainProcess] Task celery.task.http.HttpDispatchTask [f2cc8efc-2a14-40cd-85ad-f1c77c94beeb] processed: 100 Since applying tasks can be done via HTTP using the celery Ensuring a task is only executed one at a time Running celeryd as a daemon start-stop-daemon (Debian/Ubuntu/++) supervisord launchd (OS X) This page contains common recipes and techniques. © Copyright0 码力 | 284 页 | 332.71 KB | 1 年前3
Celery 2.2 Documentationkeys in this mapping. Example Usage @task def add(x, y): print("Executing task id %r, args: %r kwargs: %r" % ( add.request.id, add.request.args, add.request.kwargs)) Logging You can "priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": self.redis.incr("taskset-" + setid) if current >= result.total: r = subtask(callback).delay(result.join()) @cached_property def redis(self): return R0 码力 | 505 页 | 878.66 KB | 1 年前3
Celery 2.2 Documentationavailability of keys in this mapping. Example Usage @task def add(x, y): print("Executing task id %r, args: %r kwargs: %r" % ( add.request.id, add.request.args, add.request.kwargs)) 2.2.3 Logging You can use the 09:07:52", "priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": 0, "request": TaskSetResult.restore(setid) current = self.redis.incr("taskset-" + setid) if current >= result.total: r = subtask(callback).delay(result.join()) @cached_property 2.6. Sets of tasks, Subtasks and Callbacks0 码力 | 314 页 | 1.26 MB | 1 年前3
Celery 2.1 Documentation"priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": task being executed: [INFO/MainProcess] Task celery.task.http.HttpDispatchTask [f2cc8efc-2a14-40cd-85ad-f1c77c94beeb] processed: 100 Since applying tasks can be done via HTTP using the djcelery result: Show the result of a task $ celeryctl result -t tasks.add 4e196aa4-0141-4601- 8138-7aa33db0f577 Note that you can omit the name of the task as long as the task doesn’t use a custom result backend0 码力 | 463 页 | 861.69 KB | 1 年前3
Celery 2.0 Documentation09:07:52", "priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": 0, "request": show the task being processed: [INFO/MainProcess] Task celery.task.http.HttpDispatchTask [f2cc8efc-2a14-40cd-85ad-f1c77c94beeb] processed: 100 Since applying tasks can be done via HTTP using the celery.views not daemonize itself, please use one of the following daemonization tools. • start-stop-daemon (Debian/Ubuntu/++) – Init script: celeryd * Example configuration * Example Django configuration * Available0 码力 | 165 页 | 492.43 KB | 1 年前3
Celery 2.1 Documentation09:07:52", "priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": 0, "request": show the task being executed: [INFO/MainProcess] Task celery.task.http.HttpDispatchTask [f2cc8efc-2a14-40cd-85ad-f1c77c94beeb] processed: 100 Since applying tasks can be done via HTTP using the djcelery Celery Documentation, Release 2.1.4 $ celeryctl result -t tasks.add 4e196aa4-0141-4601-8138-7aa33db0f577 Note that you can omit the name of the task as long as the task doesn’t use a custom result backend0 码力 | 285 页 | 1.19 MB | 1 年前3
Celery 2.3 DocumentationExample Usage from celery.task import task @task def add(x, y): print("Executing task id %r, args: %r kwargs: %r" % ( add.request.id, add.request.args, add.request.kwargs)) 16 Chapter 2. User Guide Celery DebugTask(Task): abstract = True def after_return(self, \*args, \*\*kwargs): print("Task returned: %r" % (self.request, )) @task(base=DebugTask) def add(x, y): return x + y Handlers execute(self, request 09:07:52", "priority": 0, "request": { "name": "tasks.sleeptask", "id": "1a7980ea-8b19-413e-91d2-0b74f3844c4d", "args": "[1]", "kwargs": "{}"}}, {"eta": "2010-06-07 09:07:53", "priority": 0, "request":0 码力 | 334 页 | 1.25 MB | 1 年前3
Scrapy 2.4 Documentationthat: pip install scrapy Note: The same non-Python dependencies can be used to install Scrapy in Debian Jessie (8.0) and above. macOS Building Scrapy’s dependencies requires the presence of a C compiler response): page = response.url.split("/")[-2] filename = f'quotes-{page}.html' with open(filename, 'wb') as f: f.write(response.body) self.log(f'Saved file {filename}') As you can see, our Spider subclasses def parse(self, response): page = response.url.split("/")[-2] filename = f'quotes-{page}.html' with open(filename, 'wb') as f: f.write(response.body) The parse() method will be called to handle each of0 码力 | 354 页 | 1.39 MB | 1 年前3
Celery 3.1 DocumentationDetailed information about using RabbitMQ with Celery: Using RabbitMQ If you are using Ubuntu or Debian install RabbitMQ by executing this command: $ sudo apt-get install rabbitmq-server When the command messages for you: Starting rabbitmq-server: SUCCESS. And don’t worry if you’re not running Ubuntu or Debian, you can go to this website to find similarly simple installation instructions for other platforms start: Permission Error • If you’re using Debian, Ubuntu or other Debian-based distributions: 2.2. Getting Started 29 Celery Documentation, Release 3.1.25 Debian recently renamed the /dev/shm special file0 码力 | 607 页 | 2.27 MB | 1 年前3
Celery 3.1 DocumentationDetailed information about using RabbitMQ with Celery: Using RabbitMQ If you are using Ubuntu or Debian install RabbitMQ by executing this command: $ sudo apt-get install rabbitmq-server When the command messages for you: Starting rabbitmq-server: SUCCESS. And don’t worry if you’re not running Ubuntu or Debian, you can go to this website to find similarly simple installation instructions for other platforms Asked Questions. Worker does not start: Permission Error If you’re using Debian, Ubuntu or other Debian-based distributions: Debian recently renamed the /dev/shm special file to /run/shm. A simple workaround0 码力 | 887 页 | 1.22 MB | 1 年前3
共 572 条
- 1
- 2
- 3
- 4
- 5
- 6
- 58













