Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 726c865

Browse files
author
Rune Halvorsen
committed
Proofread the faq
1 parent 595a713 commit 726c865

File tree

1 file changed

+41
-35
lines changed

1 file changed

+41
-35
lines changed

FAQ

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,39 @@ content-type. The default serialization scheme is pickle because it's the most
1717
used, and it has support for sending complex objects as task arguments.
1818

1919
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
2121
instance.
2222

2323
Is celery for Django only?
2424
--------------------------
2525

2626
**Answer:** No.
2727

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+
3032

3133
Do I have to use AMQP/RabbitMQ?
3234
-------------------------------
3335

3436
**Answer**: No.
3537

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
3739
queues`_.
3840

3941
.. _`Using other queues`:
4042
http://ask.github.com/celery/tutorials/otherqueues.html
4143

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.
4749
They will probably work fine for most use cases, and note that the above
4850
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.
5053

5154
Is celery multi-lingual?
5255
------------------------
@@ -61,7 +64,7 @@ messages. There's no other communication involved.
6164
Also, there's another way to be language indepedent, and that is to use REST
6265
tasks, instead of your tasks being functions, they're URLs. With this
6366
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`_.
6568

6669
.. _`User Guide: Remote Tasks`:
6770
http://ask.github.com/celery/userguide/remote-tasks.html
@@ -119,7 +122,7 @@ I'm having ``IntegrityError: Duplicate Key`` errors. Why?
119122
**Answer:** See `MySQL is throwing deadlock errors, what can I do?`_.
120123
Thanks to howsthedotcom.
121124

122-
Why isn't my tasks processed?
125+
Why aren't my tasks processed?
123126
-----------------------------
124127
**Answer:** With RabbitMQ you can see how many consumers are currently
125128
receiving tasks by running the following command::
@@ -137,20 +140,23 @@ wasn't properly shut down.
137140

138141
When a message is recieved by a worker the broker waits for it to be
139142
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
141144
properly.
142145

143146
If you hit this problem you have to kill all workers manually and restart
144147
them::
145148

146149
ps auxww | grep celeryd | awk '{print $2}' | xargs kill
147150

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
150153
with::
151154

152155
ps auxww | grep celeryd | awk '{print $2}' | xargs kill -9
153156

157+
fixme: killall wont work?
158+
159+
154160
Why won't my Task run?
155161
----------------------
156162

@@ -206,9 +212,9 @@ Brokers
206212
Can I use celery with ActiveMQ/STOMP?
207213
-------------------------------------
208214

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
212218
using STOMP and celery, please report the bugs to the issue tracker:
213219

214220
http://github.com/ask/celery/issues/
@@ -270,7 +276,7 @@ Use the following specific settings in your ``settings.py``:
270276
Now you can go on reading the tutorial in the README, ignoring any AMQP
271277
specific options.
272278

273-
Which features are not supported when using STOMP?
279+
What features are not supported when using STOMP?
274280
--------------------------------------------------
275281

276282
This is a (possible incomplete) list of features not available when
@@ -400,23 +406,23 @@ just specify a custom exchange and exchange type:
400406
Easy? No? If you're confused about these terms, you should read up on
401407
AMQP and RabbitMQ. It might be hard to grok the concepts of
402408
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
404410

405411
Can I use celery without Django?
406412
--------------------------------
407413

408414
**Answer:** Yes.
409415

410416
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
412418
executed. Currently there are two loaders, the default loader and the Django
413419
loader. If you want to use celery without a Django project, you either have to
414420
use the default loader, or write a loader of your own.
415421

416422
The rest of this answer describes how to use the default loader.
417423

418424
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?
420426

421427
$ git clone git://github.com/ask/celery.git
422428
$ cd celery
@@ -434,7 +440,7 @@ whatever::
434440
You need a configuration file named ``celeryconfig.py``, either in the
435441
directory you run ``celeryd`` in, or in a Python library path where it is
436442
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
438444
database backend you have to configure the database. Here is an example
439445
configuration using the database backend with MySQL:
440446

@@ -464,12 +470,12 @@ configuration using the database backend with MySQL:
464470
# is able to find and run them.
465471
CELERY_IMPORTS = ("mytaskmodule1", "mytaskmodule2")
466472

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
468474
run ``celeryinit`` to create the database tables::
469475

470476
$ celeryinit
471477

472-
Then you should be able to successfully run ``celeryd``::
478+
At this point you should be able to successfully run ``celeryd``::
473479

474480
$ celeryd --loglevel=INFO
475481

@@ -484,19 +490,19 @@ and send a task from a python shell (note that it must be able to import
484490
The celery test-suite is failing
485491
--------------------------------
486492

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
489495
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.
491497

492498
http://github.com/ask/celery/issues/
493499

494500
That Django is running tests for all applications in ``INSTALLED_APPS``
495501
is a pet peeve of mine. You should use a test runner that either
496502

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:
498504

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.
500506

501507
For example this test runner that celery is using:
502508

@@ -544,12 +550,12 @@ Can I change the interval of a periodic task at runtime?
544550
Does celery support task priorities?
545551
------------------------------------
546552

547-
**Answer**: No, or theoretically as AMQP supports priorities but
553+
**Answer**: No. In theory, yes, as AMQP supports priorities. However
548554
RabbitMQ doesn't implement them yet.
549555

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
553559
highly performant system.
554560

555561
Can I schedule tasks to execute at a specific time?
@@ -561,7 +567,7 @@ Can I schedule tasks to execute at a specific time?
561567

562568
However, you can't schedule a periodic task at a specific time yet.
563569
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
565571
been written here: http://bit.ly/99UQNO
566572

567573

0 commit comments

Comments
 (0)