@@ -17,36 +17,39 @@ content-type. The default serialization scheme is pickle because it's the most
17
17
used, and it has support for sending complex objects as task arguments.
18
18
19
19
You can set a global default serializer, the default serializer for a
20
- particular Task, and even what serializer to use when sending a single task
20
+ particular Task, or even what serializer to use when sending a single task
21
21
instance.
22
22
23
23
Is celery for Django only?
24
24
--------------------------
25
25
26
26
**Answer:** No.
27
27
28
- While django itself is a dependency, you can still use all of celerys features
29
- outside of a django project.
28
+ While django itself is a dependency, you can still use all of celery's features
29
+ outside of a django project. fixme: question about removing the dependency
30
+
31
+
30
32
31
33
Do I have to use AMQP/RabbitMQ?
32
34
-------------------------------
33
35
34
36
**Answer**: No.
35
37
36
- You can also use Redis or an SQL database, for instructions see `Using other
38
+ You can also use Redis or an SQL database, see `Using other
37
39
queues`_.
38
40
39
41
.. _`Using other queues`:
40
42
http://ask.github.com/celery/tutorials/otherqueues.html
41
43
42
- Redis or a database won't meet up to the standards
43
- of an AMQP broker. If you have strict reliability requirements you are
44
- encouraged to use RabbitMQ or another AMQP broker. Redis/database also uses
45
- pulling , so they are likely to consume more resources. However, if you for
46
- some reason is not able to use AMQP, feel free to use these alternatives.
44
+ Redis or a database won't perform as well as
45
+ an AMQP broker. If you have strict reliability requirements you are
46
+ encouraged to use RabbitMQ or another AMQP broker. Redis/database also use
47
+ polling , so they are likely to consume more resources. However, if you for
48
+ some reason are not able to use AMQP, feel free to use these alternatives.
47
49
They will probably work fine for most use cases, and note that the above
48
50
points are not specific to celery; If using Redis/database as a queue worked
49
- fine for you before, it probably will now. And you can always upgrade later.
51
+ fine for you before, it probably will now. You can always upgrade later
52
+ if you need to.
50
53
51
54
Is celery multi-lingual?
52
55
------------------------
@@ -61,7 +64,7 @@ messages. There's no other communication involved.
61
64
Also, there's another way to be language indepedent, and that is to use REST
62
65
tasks, instead of your tasks being functions, they're URLs. With this
63
66
information you can even create simple web servers that enable preloading of
64
- code. For more information about REST tasks see : `User Guide: Remote Tasks`_.
67
+ code. See : `User Guide: Remote Tasks`_.
65
68
66
69
.. _`User Guide: Remote Tasks`:
67
70
http://ask.github.com/celery/userguide/remote-tasks.html
@@ -119,7 +122,7 @@ I'm having ``IntegrityError: Duplicate Key`` errors. Why?
119
122
**Answer:** See `MySQL is throwing deadlock errors, what can I do?`_.
120
123
Thanks to howsthedotcom.
121
124
122
- Why isn 't my tasks processed?
125
+ Why aren 't my tasks processed?
123
126
-----------------------------
124
127
**Answer:** With RabbitMQ you can see how many consumers are currently
125
128
receiving tasks by running the following command::
@@ -137,20 +140,23 @@ wasn't properly shut down.
137
140
138
141
When a message is recieved by a worker the broker waits for it to be
139
142
acknowledged before marking the message as processed. The broker will not
140
- re-send that message to another consumer until the consumer is shutdown
143
+ re-send that message to another consumer until the consumer is shut down
141
144
properly.
142
145
143
146
If you hit this problem you have to kill all workers manually and restart
144
147
them::
145
148
146
149
ps auxww | grep celeryd | awk '{print $2}' | xargs kill
147
150
148
- You might have to wait a while until all workers has finished the work they're
149
- doing, if it's still hanging after a long time you can kill them by force
151
+ You might have to wait a while until all workers have finished the work they're
152
+ doing. If it's still hanging after a long time you can kill them by force
150
153
with::
151
154
152
155
ps auxww | grep celeryd | awk '{print $2}' | xargs kill -9
153
156
157
+ fixme: killall wont work?
158
+
159
+
154
160
Why won't my Task run?
155
161
----------------------
156
162
@@ -206,9 +212,9 @@ Brokers
206
212
Can I use celery with ActiveMQ/STOMP?
207
213
-------------------------------------
208
214
209
- **Answer**: Yes. But this is somewhat experimental for now.
210
- It is certainly working ok for me in a test configuration, but it has not
211
- been tested in production like RabbitMQ. If you have any problems with
215
+ **Answer**: Yes, but this is somewhat experimental for now.
216
+ It is working ok in a test configuration, but it has not
217
+ been tested in production like RabbitMQ has . If you have any problems with
212
218
using STOMP and celery, please report the bugs to the issue tracker:
213
219
214
220
http://github.com/ask/celery/issues/
@@ -270,7 +276,7 @@ Use the following specific settings in your ``settings.py``:
270
276
Now you can go on reading the tutorial in the README, ignoring any AMQP
271
277
specific options.
272
278
273
- Which features are not supported when using STOMP?
279
+ What features are not supported when using STOMP?
274
280
--------------------------------------------------
275
281
276
282
This is a (possible incomplete) list of features not available when
@@ -400,23 +406,23 @@ just specify a custom exchange and exchange type:
400
406
Easy? No? If you're confused about these terms, you should read up on
401
407
AMQP and RabbitMQ. It might be hard to grok the concepts of
402
408
queues, exchanges and routing/binding keys at first, but it's all very simple,
403
- I assure you.
409
+ I assure you. fixme: too colloquial perhaps? Maybe add links to docs
404
410
405
411
Can I use celery without Django?
406
412
--------------------------------
407
413
408
414
**Answer:** Yes.
409
415
410
416
Celery uses something called loaders to read/setup configuration, import
411
- modules that registers tasks and to decide what happens when a task is
417
+ modules that register tasks and to decide what happens when a task is
412
418
executed. Currently there are two loaders, the default loader and the Django
413
419
loader. If you want to use celery without a Django project, you either have to
414
420
use the default loader, or write a loader of your own.
415
421
416
422
The rest of this answer describes how to use the default loader.
417
423
418
424
First of all, installation. You need to get the development version of
419
- celery from github::
425
+ celery from github:: fixme: even in 1.0?
420
426
421
427
$ git clone git://github.com/ask/celery.git
422
428
$ cd celery
@@ -434,7 +440,7 @@ whatever::
434
440
You need a configuration file named ``celeryconfig.py``, either in the
435
441
directory you run ``celeryd`` in, or in a Python library path where it is
436
442
able to find it. The configuration file can contain any of the settings
437
- described in :mod:`celery.conf`, and in additional if you're using the
443
+ described in :mod:`celery.conf`. In addition; if you're using the
438
444
database backend you have to configure the database. Here is an example
439
445
configuration using the database backend with MySQL:
440
446
@@ -464,12 +470,12 @@ configuration using the database backend with MySQL:
464
470
# is able to find and run them.
465
471
CELERY_IMPORTS = ("mytaskmodule1", "mytaskmodule2")
466
472
467
- Now with this configuration file in the current directory you have to
473
+ With this configuration file in the current directory you have to
468
474
run ``celeryinit`` to create the database tables::
469
475
470
476
$ celeryinit
471
477
472
- Then you should be able to successfully run ``celeryd``::
478
+ At this point you should be able to successfully run ``celeryd``::
473
479
474
480
$ celeryd --loglevel=INFO
475
481
@@ -484,19 +490,19 @@ and send a task from a python shell (note that it must be able to import
484
490
The celery test-suite is failing
485
491
--------------------------------
486
492
487
- **Answer**: You're running tests from your own Django applicaiton, and celerys
488
- tests are failing and celerys tests are failing in that context?
493
+ **Answer**: You're running tests from your own Django applicaiton, and celery's
494
+ tests are failing and celery's tests are failing in that context? fixme: I don't get the preceding sentence
489
495
If so, read on for a trick, if not please report the test failure to our issue
490
- tracker at GitHub.
496
+ tracker on GitHub.
491
497
492
498
http://github.com/ask/celery/issues/
493
499
494
500
That Django is running tests for all applications in ``INSTALLED_APPS``
495
501
is a pet peeve of mine. You should use a test runner that either
496
502
497
- 1) Explicitly lists the apps you want to run tests for, or
503
+ 1) Explicitly lists the apps you want to run tests for, or:
498
504
499
- 2) make a test runner that skips tests for apps you don't want to run.
505
+ 2) Make a test runner that skips tests for apps you don't want to run.
500
506
501
507
For example this test runner that celery is using:
502
508
@@ -544,12 +550,12 @@ Can I change the interval of a periodic task at runtime?
544
550
Does celery support task priorities?
545
551
------------------------------------
546
552
547
- **Answer**: No, or theoretically as AMQP supports priorities but
553
+ **Answer**: No. In theory, yes, as AMQP supports priorities. However
548
554
RabbitMQ doesn't implement them yet.
549
555
550
- However the usual way to prioritize work in celery, is to route high priority tasks
551
- to different servers. In the real world this may actually work better than per. message
552
- priorities. You can use this in combination with rate limting to achieve a
556
+ The usual way to prioritize work in celery, is to route high priority tasks
557
+ to different servers. In the real world this may actually work better than per message
558
+ priorities. You can use this in combination with rate limiting to achieve a
553
559
highly performant system.
554
560
555
561
Can I schedule tasks to execute at a specific time?
@@ -561,7 +567,7 @@ Can I schedule tasks to execute at a specific time?
561
567
562
568
However, you can't schedule a periodic task at a specific time yet.
563
569
The good news is, if anyone is willing
564
- to implement it, it shouldn't be that hard, some pointers to achieve this has
570
+ to implement it, it shouldn't be that hard. Some pointers to achieve this has
565
571
been written here: http://bit.ly/99UQNO
566
572
567
573
0 commit comments