forked from ask/celery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangelog
1556 lines (1031 loc) · 52.1 KB
/
Changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
================
Change history
================
1.0.3 [2010-05-15 03:00 P.M CEST]
=================================
Important notes
---------------
* Messages are now acked *just before* the task function is executed.
This is the behavior we've wanted all along, but couldn't have because of
limitations in the multiprocessing module.
The previous behavior was not good, and the situation worsened with the
release of 1.0.1, so this change will definitely improve
reliability, performance and operations in general.
For more information please see http://bit.ly/9hom6T
* Database result backend: result now explicitly sets ``null=True`` as
``django-picklefield`` version 0.1.5 changed the default behavior
right under our noses :(
See: http://bit.ly/d5OwMr
This means those who created their celery tables (via syncdb or
celeryinit) with picklefield versions >= 0.1.5 has to alter their tables to
allow the result field to be ``NULL`` manually.
MySQL::
ALTER TABLE celery_taskmeta MODIFY result TEXT NULL
* Removed ``Task.rate_limit_queue_type``, as it was not really useful
and made it harder to refactor some parts.
* Now depends on carrot >= 0.10.4
* Now depends on billiard >= 0.3.0
News
----
* AMQP backend: Added timeout support for ``result.get()`` /
``result.wait()``.
* New task option: ``Task.acks_late`` (default: ``CELERY_ACKS_LATE``)
Late ack means the task messages will be acknowledged **after** the task
has been executed, not *just before*, which is the default behavior.
Note that this means the tasks may be executed twice if the worker
crashes in the middle of their execution. Not acceptable for most
applications, but desirable for others.
* Added crontab-like scheduling to periodic tasks.
Like a cron job, you can specify units of time of when
you would like the task to execute. While not a full implementation
of cron's features, it should provide a fair degree of common scheduling
needs.
You can specify a minute (0-59), an hour (0-23), and/or a day of the
week (0-6 where 0 is Sunday, or by names: sun, mon, tue, wed, thu, fri,
sat).
Examples:
.. code-block:: python
from celery.task.schedules import crontab
from celery.decorators import periodic_task
@periodic_task(run_every=crontab(hour=7, minute=30))
def every_morning():
print("Runs every morning at 7:30a.m")
@periodic_task(run_every=crontab(hour=7, minute=30, day_of_week="mon"))
def every_monday_morning():
print("Run every monday morning at 7:30a.m")
@periodic_task(run_every=crontab(minutes=30))
def every_hour():
print("Runs every hour on the clock. e.g. 1:30, 2:30, 3:30 etc.")
Note that this a late addition. While we have unittests, due to the
nature of this feature we haven't been able to completely test this
in practice, so consider this experimental.
* ``TaskPool.apply_async``: Now supports the ``accept_callback`` argument.
* ``apply_async``: Now raises :exc:`ValueError` if task args is not a list,
or kwargs is not a tuple (http://github.com/ask/celery/issues/issue/95).
* ``Task.max_retries`` can now be ``None``, which means it will retry forever.
* Celerybeat: Now reuses the same connection when publishing large
sets of tasks.
* Modified the task locking example in the documentation to use
``cache.add`` for atomic locking.
* Added experimental support for a *started* status on tasks.
If ``Task.track_started`` is enabled the task will report its status
as "started" when the task is executed by a worker.
The default value is ``False`` as the normal behaviour is to not
report that level of granularity. Tasks are either pending, finished,
or waiting to be retried. Having a "started" status can be useful for
when there are long running tasks and there is a need to report which
task is currently running.
The global default can be overridden by the ``CELERY_TRACK_STARTED``
setting.
* User Guide: New section ``Tips and Best Practices``.
Contributions welcome!
Remote control commands
-----------------------
* Remote control commands can now send replies back to the caller.
Existing commands has been improved to send replies, and the client
interface in ``celery.task.control`` has new keyword arguments: ``reply``,
``timeout`` and ``limit``. Where reply means it will wait for replies,
timeout is the time in seconds to stop waiting for replies, and limit
is the maximum number of replies to get.
By default, it will wait for as many replies as possible for one second.
* rate_limit(task_name, destination=all, reply=False, timeout=1, limit=0)
Worker returns ``{"ok": message}`` on success,
or ``{"failure": message}`` on failure.
>>> from celery.task.control import rate_limit
>>> rate_limit("tasks.add", "10/s", reply=True)
[{'worker1': {'ok': 'new rate limit set successfully'}},
{'worker2': {'ok': 'new rate limit set successfully'}}]
* ping(destination=all, reply=False, timeout=1, limit=0)
Worker returns the simple message ``"pong"``.
>>> from celery.task.control import ping
>>> ping(reply=True)
[{'worker1': 'pong'},
{'worker2': 'pong'},
* revoke(destination=all, reply=False, timeout=1, limit=0)
Worker simply returns ``True``.
>>> from celery.task.control import revoke
>>> revoke("419e46eb-cf6a-4271-86a8-442b7124132c", reply=True)
[{'worker1': True},
{'worker2'; True}]
* You can now add your own remote control commands!
Remote control commands are functions registered in the command
registry. Registering a command is done using
:meth:`celery.worker.control.Panel.register`:
.. code-block:: python
from celery.task.control import Panel
@Panel.register
def reset_broker_connection(panel, **kwargs):
panel.listener.reset_connection()
return {"ok": "connection re-established"}
With this module imported in the worker, you can launch the command
using ``celery.task.control.broadcast``::
>>> from celery.task.control import broadcast
>>> broadcast("reset_broker_connection", reply=True)
[{'worker1': {'ok': 'connection re-established'},
{'worker2': {'ok': 'connection re-established'}}]
**TIP** You can choose the worker(s) to receive the command
by using the ``destination`` argument::
>>> broadcast("reset_broker_connection", destination=["worker1"])
[{'worker1': {'ok': 'connection re-established'}]
* New remote control command: ``dump_reserved``
Dumps tasks reserved by the worker, waiting to be executed::
>>> from celery.task.control import broadcast
>>> broadcast("dump_reserved", reply=True)
[{'myworker1': [<TaskWrapper ....>]}]
* New remote control command: ``dump_schedule``
Dumps the workers currently registered ETA schedule.
These are tasks with an ``eta`` (or ``countdown``) argument
waiting to be executed by the worker.
>>> from celery.task.control import broadcast
>>> broadcast("dump_schedule", reply=True)
[{'w1': []},
{'w3': []},
{'w2': ['0. 2010-05-12 11:06:00 pri0 <TaskWrapper:
{name:"opalfeeds.tasks.refresh_feed_slice",
id:"95b45760-4e73-4ce8-8eac-f100aa80273a",
args:"(<Feeds freq_max:3600 freq_min:60
start:2184.0 stop:3276.0>,)",
kwargs:"{'page': 2}"}>']},
{'w4': ['0. 2010-05-12 11:00:00 pri0 <TaskWrapper:
{name:"opalfeeds.tasks.refresh_feed_slice",
id:"c053480b-58fb-422f-ae68-8d30a464edfe",
args:"(<Feeds freq_max:3600 freq_min:60
start:1092.0 stop:2184.0>,)",
kwargs:"{\'page\': 1}"}>',
'1. 2010-05-12 11:12:00 pri0 <TaskWrapper:
{name:"opalfeeds.tasks.refresh_feed_slice",
id:"ab8bc59e-6cf8-44b8-88d0-f1af57789758",
args:"(<Feeds freq_max:3600 freq_min:60
start:3276.0 stop:4365>,)",
kwargs:"{\'page\': 3}"}>']}]
Fixes
-----
* Mediator thread no longer blocks for more than 1 second.
With rate limits enabled and when there was a lot of remaining time,
the mediator thread could block shutdown (and potentially block other
jobs from coming in).
* Remote rate limits was not properly applied
(http://github.com/ask/celery/issues/issue/98)
* Now handles exceptions with unicode messages correctly in
``TaskWrapper.on_failure``.
* Database backend: ``TaskMeta.result``: default value should be ``None``
not empty string.
1.0.2 [2010-03-31 12:50 P.M CET]
================================
* Deprecated: ``CELERY_BACKEND``, please use ``CELERY_RESULT_BACKEND``
instead.
* We now use a custom logger in tasks. This logger supports task magic
keyword arguments in formats.
The default format for tasks (``CELERYD_TASK_LOG_FORMAT``) now includes
the id and the name of tasks so the origin of task log messages can
easily be traced.
Example output::
[2010-03-25 13:11:20,317: INFO/PoolWorker-1]
[tasks.add(a6e1c5ad-60d9-42a0-8b24-9e39363125a4)] Hello from add
To revert to the previous behavior you can set::
CELERYD_TASK_LOG_FORMAT = """
[%(asctime)s: %(levelname)s/%(processName)s] %(message)s
""".strip()
* Unittests: Don't disable the django test database teardown,
instead fixed the underlying issue which was caused by modifications
to the ``DATABASE_NAME`` setting (http://github.com/ask/celery/issues/82).
* Django Loader: New config ``CELERY_DB_REUSE_MAX`` (max number of tasks
to reuse the same database connection)
The default is to use a new connection for every task.
We would very much like to reuse the connection, but a safe number of
reuses is not known, and we don't have any way to handle the errors
that might happen, which may even be database dependent.
See: http://bit.ly/94fwdd
* celeryd: The worker components are now configurable: ``CELERYD_POOL``,
``CELERYD_LISTENER``, ``CELERYD_MEDIATOR``, and ``CELERYD_ETA_SCHEDULER``.
The default configuration is as follows:
.. code-block:: python
CELERYD_POOL = "celery.worker.pool.TaskPool"
CELERYD_MEDIATOR = "celery.worker.controllers.Mediator"
CELERYD_ETA_SCHEDULER = "celery.worker.controllers.ScheduleController"
CELERYD_LISTENER = "celery.worker.listener.CarrotListener"
The ``CELERYD_POOL`` setting makes it easy to swap out the multiprocessing
pool with a threaded pool, or how about a twisted/eventlet pool?
Consider the competition for the first pool plug-in started!
* Debian init scripts: Use ``-a`` not ``&&``
(http://github.com/ask/celery/issues/82).
* Debian init scripts: Now always preserves ``$CELERYD_OPTS`` from the
``/etc/default/celeryd`` and ``/etc/default/celerybeat``.
* celery.beat.Scheduler: Fixed a bug where the schedule was not properly
flushed to disk if the schedule had not been properly initialized.
* celerybeat: Now syncs the schedule to disk when receiving the ``SIGTERM``
and ``SIGINT`` signals.
* Control commands: Make sure keywords arguments are not in unicode.
* ETA scheduler: Was missing a logger object, so the scheduler crashed
when trying to log that a task had been revoked.
* management.commands.camqadm: Fixed typo ``camqpadm`` -> ``camqadm``
(http://github.com/ask/celery/issues/83).
* PeriodicTask.delta_resolution: Was not working for days and hours, now fixed
by rounding to the nearest day/hour.
* Fixed a potential infinite loop in ``BaseAsyncResult.__eq__``, although
there is no evidence that it has ever been triggered.
* celeryd: Now handles messages with encoding problems by acking them and
emitting an error message.
1.0.1 [2010-02-24 07:05 P.M CET]
================================
* Tasks are now acknowledged early instead of late.
This is done because messages can only be acked within the same
connection channel, so if the connection is lost we would have to refetch
the message again to acknowledge it.
This might or might not affect you, but mostly those running tasks with a
really long execution time are affected, as all tasks that has made it
all the way into the pool needs to be executed before the worker can
safely terminate (this is at most the number of pool workers, multiplied
by the ``CELERYD_PREFETCH_MULTIPLIER`` setting.)
We multiply the prefetch count by default to increase the performance at
times with bursts of tasks with a short execution time. If this doesn't
apply to your use case, you should be able to set the prefetch multiplier
to zero, without sacrificing performance.
Please note that a patch to :mod:`multiprocessing` is currently being
worked on, this patch would enable us to use a better solution, and is
scheduled for inclusion in the ``1.2.0`` release.
* celeryd now shutdowns cleanly when receving the ``TERM`` signal.
* celeryd now does a cold shutdown if the ``INT`` signal is received (Ctrl+C),
this means it tries to terminate as soon as possible.
* Caching of results now moved to the base backend classes, so no need
to implement this functionality in the base classes.
* Caches are now also limited in size, so their memory usage doesn't grow
out of control.
You can set the maximum number of results the cache
can hold using the ``CELERY_MAX_CACHED_RESULTS`` setting (the default
is five thousand results). In addition, you can refetch already retrieved
results using ``backend.reload_task_result`` +
``backend.reload_taskset_result`` (that's for those who want to send
results incrementally).
* ``celeryd`` now works on Windows again.
Note that if running with Django,
you can't use ``project.settings`` as the settings module name, but the
following should work::
$ python manage.py celeryd --settings=settings
* Execution: ``.messaging.TaskPublisher.send_task`` now
incorporates all the functionality apply_async previously did.
Like converting countdowns to eta, so :func:`celery.execute.apply_async` is
now simply a convenient front-end to
:meth:`celery.messaging.TaskPublisher.send_task`, using
the task classes default options.
Also :func:`celery.execute.send_task` has been
introduced, which can apply tasks using just the task name (useful
if the client does not have the destination task in its task registry).
Example:
>>> from celery.execute import send_task
>>> result = send_task("celery.ping", args=[], kwargs={})
>>> result.get()
'pong'
* ``camqadm``: This is a new utility for command line access to the AMQP API.
Excellent for deleting queues/bindings/exchanges, experimentation and
testing::
$ camqadm
1> help
Gives an interactive shell, type ``help`` for a list of commands.
When using Django, use the management command instead::
$ python manage.py camqadm
1> help
* Redis result backend: To conform to recent Redis API changes, the following
settings has been deprecated:
* ``REDIS_TIMEOUT``
* ``REDIS_CONNECT_RETRY``
These will emit a ``DeprecationWarning`` if used.
A ``REDIS_PASSWORD`` setting has been added, so you can use the new
simple authentication mechanism in Redis.
* The redis result backend no longer calls ``SAVE`` when disconnecting,
as this is apparently better handled by Redis itself.
* If ``settings.DEBUG`` is on, celeryd now warns about the possible
memory leak it can result in.
* The ETA scheduler now sleeps at most two seconds between iterations.
* The ETA scheduler now deletes any revoked tasks it might encounter.
As revokes are not yet persistent, this is done to make sure the task
is revoked even though it's currently being hold because its eta is e.g.
a week into the future.
* The ``task_id`` argument is now respected even if the task is executed
eagerly (either using apply, or ``CELERY_ALWAYS_EAGER``).
* The internal queues are now cleared if the connection is reset.
* New magic keyword argument: ``delivery_info``.
Used by retry() to resend the task to its original destination using the same
exchange/routing_key.
* Events: Fields was not passed by ``.send()`` (fixes the uuid keyerrors
in celerymon)
* Added ``--schedule``/``-s`` option to celeryd, so it is possible to
specify a custom schedule filename when using an embedded celerybeat
server (the ``-B``/``--beat``) option.
* Better Python 2.4 compatibility. The test suite now passes.
* task decorators: Now preserve docstring as ``cls.__doc__``, (was previously
copied to ``cls.run.__doc__``)
* The ``testproj`` directory has been renamed to ``tests`` and we're now using
``nose`` + ``django-nose`` for test discovery, and ``unittest2`` for test
cases.
* New pip requirements files available in ``contrib/requirements``.
* TaskPublisher: Declarations are now done once (per process).
* Added ``Task.delivery_mode`` and the ``CELERY_DEFAULT_DELIVERY_MODE``
setting.
These can be used to mark messages non-persistent (i.e. so they are
lost if the broker is restarted).
* Now have our own ``ImproperlyConfigured`` exception, instead of using the
Django one.
* Improvements to the debian init scripts: Shows an error if the program is
not executeable. Does not modify ``CELERYD`` when using django with
virtualenv.
1.0.0 [2010-02-10 04:00 P.M CET]
================================
BACKWARD INCOMPATIBLE CHANGES
-----------------------------
* Celery does not support detaching anymore, so you have to use the tools
available on your platform, or something like supervisord to make
celeryd/celerybeat/celerymon into background processes.
We've had too many problems with celeryd daemonizing itself, so it was
decided it has to be removed. Example startup scripts has been added to
``contrib/``:
* Debian, Ubuntu, (start-stop-daemon)
``contrib/debian/init.d/celeryd``
``contrib/debian/init.d/celerybeat``
* Mac OS X launchd
``contrib/mac/org.celeryq.celeryd.plist``
``contrib/mac/org.celeryq.celerybeat.plist``
``contrib/mac/org.celeryq.celerymon.plist``
* Supervisord (http://supervisord.org)
``contrib/supervisord/supervisord.conf``
In addition to ``--detach``, the following program arguments has been
removed: ``--uid``, ``--gid``, ``--workdir``, ``--chroot``, ``--pidfile``,
``--umask``. All good daemonization tools should support equivalent
functionality, so don't worry.
Also the following configuration keys has been removed:
``CELERYD_PID_FILE``, ``CELERYBEAT_PID_FILE``, ``CELERYMON_PID_FILE``.
* Default celeryd loglevel is now ``WARN``, to enable the previous log level
start celeryd with ``--loglevel=INFO``.
* Tasks are automatically registered.
This means you no longer have to register your tasks manually.
You don't have to change your old code right away, as it doesn't matter if
a task is registered twice.
If you don't want your task to be automatically registered you can set
the ``abstract`` attribute
.. code-block:: python
class MyTask(Task):
abstract = True
By using ``abstract`` only tasks subclassing this task will be automatically
registered (this works like the Django ORM).
If you don't want subclasses to be registered either, you can set the
``autoregister`` attribute to ``False``.
Incidentally, this change also fixes the problems with automatic name
assignment and relative imports. So you also don't have to specify a task name
anymore if you use relative imports.
* You can no longer use regular functions as tasks.
This change was added
because it makes the internals a lot more clean and simple. However, you can
now turn functions into tasks by using the ``@task`` decorator:
.. code-block:: python
from celery.decorators import task
@task
def add(x, y):
return x + y
See the User Guide: :doc:`userguide/tasks` for more information.
* The periodic task system has been rewritten to a centralized solution.
This means ``celeryd`` no longer schedules periodic tasks by default,
but a new daemon has been introduced: ``celerybeat``.
To launch the periodic task scheduler you have to run celerybeat::
$ celerybeat
Make sure this is running on one server only, if you run it twice, all
periodic tasks will also be executed twice.
If you only have one worker server you can embed it into celeryd like this::
$ celeryd --beat # Embed celerybeat in celeryd.
* The supervisor has been removed.
This means the ``-S`` and ``--supervised`` options to ``celeryd`` is
no longer supported. Please use something like http://supervisord.org
instead.
* ``TaskSet.join`` has been removed, use ``TaskSetResult.join`` instead.
* The task status ``"DONE"`` has been renamed to `"SUCCESS"`.
* ``AsyncResult.is_done`` has been removed, use ``AsyncResult.successful``
instead.
* The worker no longer stores errors if ``Task.ignore_result`` is set, to
revert to the previous behaviour set
``CELERY_STORE_ERRORS_EVEN_IF_IGNORED`` to ``True``.
* The staticstics functionality has been removed in favor of events,
so the ``-S`` and ``--statistics`` switches has been removed.
* The module ``celery.task.strategy`` has been removed.
* ``celery.discovery`` has been removed, and it's ``autodiscover`` function is
now in ``celery.loaders.djangoapp``. Reason: Internal API.
* ``CELERY_LOADER`` now needs loader class name in addition to module name,
E.g. where you previously had: ``"celery.loaders.default"``, you now need
``"celery.loaders.default.Loader"``, using the previous syntax will result
in a DeprecationWarning.
* Detecting the loader is now lazy, and so is not done when importing
``celery.loaders``.
To make this happen ``celery.loaders.settings`` has
been renamed to ``load_settings`` and is now a function returning the
settings object. ``celery.loaders.current_loader`` is now also
a function, returning the current loader.
So::
loader = current_loader
needs to be changed to::
loader = current_loader()
DEPRECATIONS
------------
* The following configuration variables has been renamed and will be
deprecated in v1.2:
* CELERYD_DAEMON_LOG_FORMAT -> CELERYD_LOG_FORMAT
* CELERYD_DAEMON_LOG_LEVEL -> CELERYD_LOG_LEVEL
* CELERY_AMQP_CONNECTION_TIMEOUT -> CELERY_BROKER_CONNECTION_TIMEOUT
* CELERY_AMQP_CONNECTION_RETRY -> CELERY_BROKER_CONNECTION_RETRY
* CELERY_AMQP_CONNECTION_MAX_RETRIES -> CELERY_BROKER_CONNECTION_MAX_RETRIES
* SEND_CELERY_TASK_ERROR_EMAILS -> CELERY_SEND_TASK_ERROR_EMAILS
* The public api names in celery.conf has also changed to a consistent naming
scheme.
* We now support consuming from an arbitrary number of queues.
To do this we had to rename the configuration syntax. If you use any of
the custom AMQP routing options (queue/exchange/routing_key, etc), you
should read the new FAQ entry: http://bit.ly/aiWoH.
The previous syntax is deprecated and scheduled for removal in v1.2.
* ``TaskSet.run`` has been renamed to ``TaskSet.apply_async``.
``TaskSet.run`` has now been deprecated, and is scheduled for
removal in v1.2.
NEWS
----
* Rate limiting support (per task type, or globally).
* New periodic task system.
* Automatic registration.
* New cool task decorator syntax.
* celeryd now sends events if enabled with the ``-E`` argument.
Excellent for monitoring tools, one is already in the making
(http://github.com/ask/celerymon).
Current events include: worker-heartbeat,
task-[received/succeeded/failed/retried],
worker-online, worker-offline.
* You can now delete (revoke) tasks that has already been applied.
* You can now set the hostname celeryd identifies as using the ``--hostname``
argument.
* Cache backend now respects ``CELERY_TASK_RESULT_EXPIRES``.
* Message format has been standardized and now uses ISO-8601 format
for dates instead of datetime.
* ``celeryd`` now responds to the ``HUP`` signal by restarting itself.
* Periodic tasks are now scheduled on the clock.
I.e. ``timedelta(hours=1)`` means every hour at :00 minutes, not every
hour from the server starts. To revert to the previous behaviour you
can set ``PeriodicTask.relative = True``.
* Now supports passing execute options to a TaskSets list of args, e.g.:
>>> ts = TaskSet(add, [([2, 2], {}, {"countdown": 1}),
... ([4, 4], {}, {"countdown": 2}),
... ([8, 8], {}, {"countdown": 3})])
>>> ts.run()
* Got a 3x performance gain by setting the prefetch count to four times the
concurrency, (from an average task round-trip of 0.1s to 0.03s!).
A new setting has been added: ``CELERYD_PREFETCH_MULTIPLIER``, which
is set to ``4`` by default.
* Improved support for webhook tasks.
``celery.task.rest`` is now deprecated, replaced with the new and shiny
:mod:`celery.task.http`. With more reflective names, sensible interface,
and it's possible to override the methods used to perform HTTP requests.
* The results of tasksets are now cached by storing it in the result
backend.
CHANGES
-------
* Now depends on carrot >= 0.8.1
* New dependencies: billiard, python-dateutil, django-picklefield
* No longer depends on python-daemon
* The ``uuid`` distribution is added as a dependency when running Python 2.4.
* Now remembers the previously detected loader by keeping it in
the ``CELERY_LOADER`` environment variable.
This may help on windows where fork emulation is used.
* ETA no longer sends datetime objects, but uses ISO 8601 date format in a
string for better compatibility with other platforms.
* No longer sends error mails for retried tasks.
* Task can now override the backend used to store results.
* Refactored the ExecuteWrapper, ``apply`` and ``CELERY_ALWAYS_EAGER`` now
also executes the task callbacks and signals.
* Now using a proper scheduler for the tasks with an ETA.
This means waiting eta tasks are sorted by time, so we don't have
to poll the whole list all the time.
* Now also imports modules listed in CELERY_IMPORTS when running
with django (as documented).
* Loglevel for stdout/stderr changed from INFO to ERROR
* ImportErrors are now properly propogated when autodiscovering tasks.
* You can now use ``celery.messaging.establish_connection`` to establish a
connection to the broker.
* When running as a separate service the periodic task scheduler does some
smart moves to not poll too regularly.
If you need faster poll times you can lower the value
of ``CELERYBEAT_MAX_LOOP_INTERVAL``.
* You can now change periodic task intervals at runtime, by making
``run_every`` a property, or subclassing ``PeriodicTask.is_due``.
* The worker now supports control commands enabled through the use of a
broadcast queue, you can remotely revoke tasks or set the rate limit for
a task type. See :mod:`celery.task.control`.
* The services now sets informative process names (as shown in ``ps``
listings) if the :mod:`setproctitle` module is installed.
* :exc:`celery.exceptions.NotRegistered` now inherits from :exc:`KeyError`,
and ``TaskRegistry.__getitem__``+``pop`` raises ``NotRegistered`` instead
* You can set the loader via the ``CELERY_LOADER`` environment variable.
* You can now set ``CELERY_IGNORE_RESULT`` to ignore task results by default
(if enabled, tasks doesn't save results or errors to the backend used).
* celeryd now correctly handles malformed messages by throwing away and
acknowledging the message, instead of crashing.
BUGS
----
* Fixed a race condition that could happen while storing task results in the
database.
DOCUMENTATION
-------------
* Reference now split into two sections; API reference and internal module
reference.
0.8.4 [2010-02-05 01:52 P.M CEST]
---------------------------------
* Now emits a warning if the --detach argument is used.
--detach should not be used anymore, as it has several not easily fixed
bugs related to it. Instead, use something like start-stop-daemon,
supervisord or launchd (os x).
* Make sure logger class is process aware, even if running Python >= 2.6.
* Error e-mails are not sent anymore when the task is retried.
0.8.3 [2009-12-22 09:43 A.M CEST]
---------------------------------
* Fixed a possible race condition that could happen when storing/querying
task results using the the database backend.
* Now has console script entry points in the setup.py file, so tools like
buildout will correctly install the programs celerybin and celeryinit.
0.8.2 [2009-11-20 03:40 P.M CEST]
---------------------------------
* QOS Prefetch count was not applied properly, as it was set for every message
received (which apparently behaves like, "receive one more"), instead of only
set when our wanted value cahnged.
0.8.1 [2009-11-16 05:21 P.M CEST]
=================================
VERY IMPORTANT NOTE
-------------------
This release (with carrot 0.8.0) enables AMQP QoS (quality of service), which
means the workers will only receive as many messages as it can handle at a
time. As with any release, you should test this version upgrade on your
development servers before rolling it out to production!
IMPORTANT CHANGES
-----------------
* If you're using Python < 2.6 and you use the multiprocessing backport, then
multiprocessing version 2.6.2.1 is required.
* All AMQP_* settings has been renamed to BROKER_*, and in addition
AMQP_SERVER has been renamed to BROKER_HOST, so before where you had::
AMQP_SERVER = "localhost"
AMQP_PORT = 5678
AMQP_USER = "myuser"
AMQP_PASSWORD = "mypassword"
AMQP_VHOST = "celery"
You need to change that to::
BROKER_HOST = "localhost"
BROKER_PORT = 5678
BROKER_USER = "myuser"
BROKER_PASSWORD = "mypassword"
BROKER_VHOST = "celery"
* Custom carrot backends now need to include the backend class name, so before
where you had::
CARROT_BACKEND = "mycustom.backend.module"
you need to change it to::
CARROT_BACKEND = "mycustom.backend.module.Backend"
where ``Backend`` is the class name. This is probably ``"Backend"``, as
that was the previously implied name.
* New version requirement for carrot: 0.8.0
CHANGES
-------
* Incorporated the multiprocessing backport patch that fixes the
``processName`` error.
* Ignore the result of PeriodicTask's by default.
* Added a Redis result store backend
* Allow /etc/default/celeryd to define additional options for the celeryd init
script.
* MongoDB periodic tasks issue when using different time than UTC fixed.
* Windows specific: Negate test for available os.fork (thanks miracle2k)
* Now tried to handle broken PID files.
* Added a Django test runner to contrib that sets CELERY_ALWAYS_EAGER = True for testing with the database backend
* Added a CELERY_CACHE_BACKEND setting for using something other than the django-global cache backend.
* Use custom implementation of functools.partial (curry) for Python 2.4 support
(Probably still problems with running on 2.4, but it will eventually be
supported)
* Prepare exception to pickle when saving RETRY status for all backends.
* SQLite no concurrency limit should only be effective if the db backend is used.
0.8.0 [2009-09-22 03:06 P.M CEST]
=================================
BACKWARD INCOMPATIBLE CHANGES
-----------------------------
* Add traceback to result value on failure.
**NOTE** If you use the database backend you have to re-create the
database table ``celery_taskmeta``.
Contact the mailinglist or IRC channel listed in README for help
doing this.
* Database tables are now only created if the database backend is used,
so if you change back to the database backend at some point,
be sure to initialize tables (django: ``syncdb``, python: ``celeryinit``).
(Note: This is only the case when using Django 1.1 or higher)
* Now depends on ``carrot`` version 0.6.0.
* Now depends on python-daemon 1.4.8
IMPORTANT CHANGES
-----------------
* Celery can now be used in pure Python (outside of a Django project).
This means celery is no longer Django specific.
For more information see the FAQ entry
`Can I use celery without Django?`_.
.. _`Can I use celery without Django?`:
http://ask.github.com/celery/faq.html#can-i-use-celery-without-django
* Celery now supports task retries.
See `Cookbook: Retrying Tasks`_ for more information.
.. _`Cookbook: Retrying Tasks`:
http://ask.github.com/celery/cookbook/task-retries.html
* We now have an AMQP result store backend.
It uses messages to publish task return value and status. And it's
incredibly fast!
See http://github.com/ask/celery/issues/closed#issue/6 for more info!
* AMQP QoS (prefetch count) implemented:
This to not receive more messages than we can handle.
* Now redirects stdout/stderr to the celeryd logfile when detached
* Now uses ``inspect.getargspec`` to only pass default arguments
the task supports.
* Add Task.on_success, .on_retry, .on_failure handlers
See :meth:`celery.task.base.Task.on_success`,
:meth:`celery.task.base.Task.on_retry`,
:meth:`celery.task.base.Task.on_failure`,
* ``celery.utils.gen_unique_id``: Workaround for
http://bugs.python.org/issue4607
* You can now customize what happens at worker start, at process init, etc
by creating your own loaders. (see :mod:`celery.loaders.default`,
:mod:`celery.loaders.djangoapp`, :mod:`celery.loaders`.)
* Support for multiple AMQP exchanges and queues.
This feature misses documentation and tests, so anyone interested
is encouraged to improve this situation.
* celeryd now survives a restart of the AMQP server!
Automatically re-establish AMQP broker connection if it's lost.
New settings:
* AMQP_CONNECTION_RETRY
Set to ``True`` to enable connection retries.
* AMQP_CONNECTION_MAX_RETRIES.
Maximum number of restarts before we give up. Default: ``100``.
NEWS
----
* Fix an incompatibility between python-daemon and multiprocessing,
which resulted in the ``[Errno 10] No child processes`` problem when
detaching.
* Fixed a possible DjangoUnicodeDecodeError being raised when saving pickled
data to Django's memcached cache backend.