forked from celery/celery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changelog
620 lines (400 loc) · 18.4 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
.. _changelog:
================
Change history
================
This document contains change notes for bugfix releases in
the 4.x series, please see :ref:`whatsnew-4.4` for
an overview of what's new in Celery 4.4.
4.4.0rc2
========
:release-date: 2019-06-15 4:00 A.M UTC+6:00
:release-by: Asif Saif Uddin
- Many bugs and regressions fixed.
- Kombu 4.6.3
4.4.0rc1
========
:release-date: 2019-06-06 1:00 P.M UTC+6:00
:release-by: Asif Saif Uddin
- Python 3.4 drop
- Kombu 4.6.1
- Replace deprecated PyMongo methods usage (#5443)
- Pass task request when calling update_state (#5474)
- Fix bug in remaining time calculation in case of DST time change (#5411)
- Fix missing task name when requesting extended result (#5439)
- Fix `collections` import issue on Python 2.7 (#5428)
- handle `AttributeError` in base backend exception deserializer (#5435)
- Make `AsynPool`'s `proc_alive_timeout` configurable (#5476)
- AMQP Support for extended result (#5495)
- Fix SQL Alchemy results backend to work with extended result (#5498)
- Fix restoring of exceptions with required param (#5500)
- Django: Re-raise exception if `ImportError` not caused by missing tasks
module (#5211)
- Django: fixed a regression putting DB connections in invalid state when
`CONN_MAX_AGE != 0` (#5515)
- Fixed `OSError` leading to lost connection to broker (#4457)
- Fixed an issue with inspect API unable get details of Request
- Fix mogodb backend authentication (#5527)
- Change column type for Extended Task Meta args/kwargs to LargeBinary
- Handle http_auth in Elasticsearch backend results (#5545)
- Fix task serializer being ignored with `task_always_eager=True` (#5549)
- Fix `task.replace` to work in `.apply() as well as `.apply_async()` (#5540)
- Fix sending of `worker_process_init` signal for solo worker (#5562)
- Fix exception message upacking (#5565)
- Add delay parameter function to beat_schedule (#5558)
- Multiple documentation updates
4.3.0
=====
:release-date: 2019-03-31 7:00 P.M UTC+3:00
:release-by: Omer Katz
- Added support for broadcasting using a regular expression pattern
or a glob pattern to multiple Pidboxes.
This allows you to inspect or ping multiple workers at once.
Contributed by **Dmitry Malinovsky** & **Jason Held**
- Added support for PEP 420 namespace packages.
This allows you to load tasks from namespace packages.
Contributed by **Colin Watson**
- Added :setting:`acks_on_failure_or_timeout` as a setting instead of
a task only option.
This was missing from the original PR but now added for completeness.
Contributed by **Omer Katz**
- Added the :signal:`task_received` signal.
Contributed by **Omer Katz**
- Fixed a crash of our CLI that occurred for everyone using Python < 3.6.
The crash was introduced in `acd6025 <https://github.com/celery/celery/commit/acd6025b7dc4db112a31020686fc8b15e1722c67>`_
by using the :class:`ModuleNotFoundError` exception which was introduced
in Python 3.6.
Contributed by **Omer Katz**
- Fixed a crash that occurred when using the Redis result backend
while the :setting:`result_expires` is set to None.
Contributed by **Toni Ruža** & **Omer Katz**
- Added support the `DNS seedlist connection format <https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format>`_
for the MongoDB result backend.
This requires the `dnspython` package which will be installed by default
when installing the dependencies for the MongoDB result backend.
Contributed by **George Psarakis**
- Bump the minimum eventlet version to 0.24.1.
Contributed by **George Psarakis**
- Replace the `msgpack-python` package with `msgpack`.
We're no longer using the deprecated package.
See our :ref:`important notes <v430-important>` for this release
for further details on how to upgrade.
Contributed by **Daniel Hahler**
- Allow scheduling error handlers which are not registered tasks in the current
worker.
These kind of error handlers are now possible:
.. code-block:: python
from celery import Signature
Signature(
'bar', args=['foo'],
link_error=Signature('msg.err', queue='msg')
).apply_async()
- Additional fixes and enhancements to the SSL support of
the Redis broker and result backend.
Contributed by **Jeremy Cohen**
Code Cleanups, Test Coverage & CI Improvements by:
- **Omer Katz**
- **Florian Chardin**
Documentation Fixes by:
- **Omer Katz**
- **Samuel Huang**
- **Amir Hossein Saeid Mehr**
- **Dmytro Litvinov**
4.3.0 RC2
=========
:release-date: 2019-03-03 9:30 P.M UTC+2:00
:release-by: Omer Katz
- **Filesystem Backend**: Added meaningful error messages for filesystem backend.
Contributed by **Lars Rinn**
- **New Result Backend**: Added the ArangoDB backend.
Contributed by **Dilip Vamsi Moturi**
- **Django**: Prepend current working directory instead of appending so that
the project directory will have precedence over system modules as expected.
Contributed by **Antonin Delpeuch**
- Bump minimum py-redis version to 3.2.0.
Due to multiple bugs in earlier versions of py-redis that were causing
issues for Celery, we were forced to bump the minimum required version to 3.2.0.
Contributed by **Omer Katz**
- **Dependencies**: Bump minimum required version of Kombu to 4.4
Contributed by **Omer Katz**
4.3.0 RC1
=========
:release-date: 2019-02-20 5:00 PM IST
:release-by: Omer Katz
- **Canvas**: :meth:`celery.chain.apply` does not ignore keyword arguments anymore when
applying the chain.
Contributed by **Korijn van Golen**
- **Result Set**: Don't attempt to cache results in a :class:`celery.result.ResultSet`.
During a join, the results cache was populated using :meth:`celery.result.ResultSet.get`, if one of the results
contains an exception, joining unexpectedly failed.
The results cache is now removed.
Contributed by **Derek Harland**
- **Application**: :meth:`celery.Celery.autodiscover_tasks` now attempts to import the package itself
when the `related_name` keyword argument is `None`.
Contributed by **Alex Ioannidis**
- **Windows Support**: On Windows 10, stale PID files prevented celery beat to run.
We now remove them when a :class:`SystemExit` is raised.
Contributed by **:github_user:`na387`**
- **Task**: Added the new :setting:`task_acks_on_failure_or_timeout` setting.
Acknowledging SQS messages on failure or timing out makes it impossible to use
dead letter queues.
We introduce the new option acks_on_failure_or_timeout,
to ensure we can totally fallback on native SQS message lifecycle,
using redeliveries for retries (in case of slow processing or failure)
and transitions to dead letter queue after defined number of times.
Contributed by **Mario Kostelac**
- **RabbitMQ Broker**: Adjust HA headers to work on RabbitMQ 3.x.
This change also means we're ending official support for RabbitMQ 2.x.
Contributed by **Asif Saif Uddin**
- **Command Line**: Improve :program:`celery update` error handling.
Contributed by **Federico Bond**
- **Canvas**: Support chords with :setting:`task_always_eager` set to `True`.
Contributed by **Axel Haustant**
- **Result Backend**: Optionally store task properties in result backend.
Setting the :setting:`result_extended` configuration option to `True` enables
storing additional task properties in the result backend.
Contributed by **John Arnold**
- **Couchbase Result Backend**: Allow the Couchbase result backend to
automatically detect the serialization format.
Contributed by **Douglas Rohde**
- **New Result Backend**: Added the Azure Block Blob Storage result backend.
The backend is implemented on top of the azure-storage library which
uses Azure Blob Storage for a scalable low-cost PaaS backend.
The backend was load tested via a simple nginx/gunicorn/sanic app hosted
on a DS4 virtual machine (4 vCores, 16 GB RAM) and was able to handle
600+ concurrent users at ~170 RPS.
The commit also contains a live end-to-end test to facilitate
verification of the backend functionality. The test is activated by
setting the `AZUREBLOCKBLOB_URL` environment variable to
`azureblockblob://{ConnectionString}` where the value for
`ConnectionString` can be found in the `Access Keys` pane of a Storage
Account resources in the Azure Portal.
Contributed by **Clemens Wolff**
- **Task**: :meth:`celery.app.task.update_state` now accepts keyword arguments.
This allows passing extra fields to the result backend.
These fields are unused by default but custom result backends can use them
to determine how to store results.
Contributed by **Christopher Dignam**
- Gracefully handle consumer :class:`kombu.exceptions.DecodeError`.
When using the v2 protocol the worker no longer crashes when the consumer
encounters an error while decoding a message.
Contributed by **Steven Sklar**
- **Deployment**: Fix init.d service stop.
Contributed by **Marcus McHale**
- **Django**: Drop support for Django < 1.11.
Contributed by **Asif Saif Uddin**
- **Django**: Remove old djcelery loader.
Contributed by **Asif Saif Uddin**
- **Result Backend**: :class:`celery.worker.request.Request` now passes
:class:`celery.app.task.Context` to the backend's store_result functions.
Since the class currently passes `self` to these functions,
revoking a task resulted in corrupted task result data when
django-celery-results was used.
Contributed by **Kiyohiro Yamaguchi**
- **Worker**: Retry if the heartbeat connection dies.
Previously, we keep trying to write to the broken connection.
This results in a memory leak because the event dispatcher will keep appending
the message to the outbound buffer.
Contributed by **Raf Geens**
- **Celery Beat**: Handle microseconds when scheduling.
Contributed by **K Davis**
- **Asynpool**: Fixed deadlock when closing socket.
Upon attempting to close a socket, :class:`celery.concurrency.asynpool.AsynPool`
only removed the queue writer from the hub but did not remove the reader.
This led to a deadlock on the file descriptor
and eventually the worker stopped accepting new tasks.
We now close both the reader and the writer file descriptors in a single loop
iteration which prevents the deadlock.
Contributed by **Joshua Engelman**
- **Celery Beat**: Correctly consider timezone when calculating timestamp.
Contributed by **:github_user:`yywing`**
- **Celery Beat**: :meth:`celery.beat.Scheduler.schedules_equal` can now handle
either arguments being a `None` value.
Contributed by **:github_user:` ratson`**
- **Documentation/Sphinx**: Fixed Sphinx support for shared_task decorated functions.
Contributed by **Jon Banafato**
- **New Result Backend**: Added the CosmosDB result backend.
This change adds a new results backend.
The backend is implemented on top of the pydocumentdb library which uses
Azure CosmosDB for a scalable, globally replicated, high-performance,
low-latency and high-throughput PaaS backend.
Contributed by **Clemens Wolff**
- **Application**: Added configuration options to allow separate multiple apps
to run on a single RabbitMQ vhost.
The newly added :setting:`event_exchange` and :setting:`control_exchange`
configuration options allow users to use separate Pidbox exchange
and a separate events exchange.
This allow different Celery applications to run separately on the same vhost.
Contributed by **Artem Vasilyev**
- **Result Backend**: Forget parent result metadata when forgetting
a result.
Contributed by **:github_user:`tothegump`**
- **Task** Store task arguments inside :class:`celery.exceptions.MaxRetriesExceededError`.
Contributed by **Anthony Ruhier**
- **Result Backend**: Added the :setting:`result_accept_content` setting.
This feature allows to configure different accepted content for the result
backend.
A special serializer (`auth`) is used for signed messaging,
however the result_serializer remains in json, because we don't want encrypted
content in our result backend.
To accept unsigned content from the result backend,
we introduced this new configuration option to specify the
accepted content from the backend.
Contributed by **Benjamin Pereto**
- **Canvas**: Fixed error callback processing for class based tasks.
Contributed by **Victor Mireyev**
- **New Result Backend**: Added the S3 result backend.
Contributed by **Florian Chardin**
- **Task**: Added support for Cythonized Celery tasks.
Contributed by **Andrey Skabelin**
- **Riak Result Backend**: Warn Riak backend users for possible Python 3.7 incompatibilities.
Contributed by **George Psarakis**
- **Python Runtime**: Added Python 3.7 support.
Contributed by **Omer Katz** & **Asif Saif Uddin**
- **Auth Serializer**: Revamped the auth serializer.
The auth serializer received a complete overhaul.
It was previously horribly broken.
We now depend on cryptography instead of pyOpenSSL for this serializer.
Contributed by **Benjamin Pereto**
- **Command Line**: :program:`celery report` now reports kernel version along
with other platform details.
Contributed by **Omer Katz**
- **Canvas**: Fixed chords with chains which include sub chords in a group.
Celery now correctly executes the last task in these types of canvases:
.. code-block:: python
c = chord(
group([
chain(
dummy.si(),
chord(
group([dummy.si(), dummy.si()]),
dummy.si(),
),
),
chain(
dummy.si(),
chord(
group([dummy.si(), dummy.si()]),
dummy.si(),
),
),
]),
dummy.si()
)
c.delay().get()
Contributed by **Maximilien Cuony**
- **Canvas**: Complex canvases with error callbacks no longer raises an :class:`AttributeError`.
Very complex canvases such as `this <https://github.com/merchise/xopgi.base/blob/6634819ad5c701c04bc9baa5c527449070843b71/xopgi/xopgi_cdr/cdr_agent.py#L181>`_
no longer raise an :class:`AttributeError` which prevents constructing them.
We do not know why this bug occurs yet.
Contributed by **Manuel Vázquez Acosta**
- **Command Line**: Added proper error messages in cases where app cannot be loaded.
Previously, celery crashed with an exception.
We now print a proper error message.
Contributed by **Omer Katz**
- **Task**: Added the :setting:`task_default_priority` setting.
You can now set the default priority of a task using
the :setting:`task_default_priority` setting.
The setting's value will be used if no priority is provided for a specific
task.
Contributed by **:github_user:`madprogrammer`**
- **Dependencies**: Bump minimum required version of Kombu to 4.3
and Billiard to 3.6.
Contributed by **Asif Saif Uddin**
- **Result Backend**: Fix memory leak.
We reintroduced weak references to bound methods for AsyncResult callback promises,
after adding full weakref support for Python 2 in `vine <https://github.com/celery/vine/tree/v1.2.0>`_.
More details can be found in `celery/celery#4839 <https://github.com/celery/celery/pull/4839>`_.
Contributed by **George Psarakis** and **:github_user:`monsterxx03`**.
- **Task Execution**: Fixed roundtrip serialization for eager tasks.
When doing the roundtrip serialization for eager tasks,
the task serializer will always be JSON unless the `serializer` argument
is present in the call to :meth:`celery.app.task.Task.apply_async`.
If the serializer argument is present but is `'pickle'`,
an exception will be raised as pickle-serialized objects
cannot be deserialized without specifying to `serialization.loads`
what content types should be accepted.
The Producer's `serializer` seems to be set to `None`,
causing the default to JSON serialization.
We now continue to use (in order) the `serializer` argument to :meth:`celery.app.task.Task.apply_async`,
if present, or the `Producer`'s serializer if not `None`.
If the `Producer`'s serializer is `None`,
it will use the Celery app's `task_serializer` configuration entry as the serializer.
Contributed by **Brett Jackson**
- **Redis Result Backend**: The :class:`celery.backends.redis.ResultConsumer` class no longer assumes
:meth:`celery.backends.redis.ResultConsumer.start` to be called before
:meth:`celery.backends.redis.ResultConsumer.drain_events`.
This fixes a race condition when using the Gevent workers pool.
Contributed by **Noam Kush**
- **Task**: Added the :setting:`task_inherit_parent_priority` setting.
Setting the :setting:`task_inherit_parent_priority` configuration option to
`True` will make Celery tasks inherit the priority of the previous task
linked to it.
Examples:
.. code-block:: python
c = celery.chain(
add.s(2), # priority=None
add.s(3).set(priority=5), # priority=5
add.s(4), # priority=5
add.s(5).set(priority=3), # priority=3
add.s(6), # priority=3
)
.. code-block:: python
@app.task(bind=True)
def child_task(self):
pass
@app.task(bind=True)
def parent_task(self):
child_task.delay()
# child_task will also have priority=5
parent_task.apply_async(args=[], priority=5)
Contributed by **:github_user:`madprogrammer`**
- **Canvas**: Added the :setting:`result_chord_join_timeout` setting.
Previously, :meth:`celery.result.GroupResult.join` had a fixed timeout of 3
seconds.
The :setting:`result_chord_join_timeout` setting now allows you to change it.
Contributed by **:github_user:`srafehi`**
Code Cleanups, Test Coverage & CI Improvements by:
- **Jon Dufresne**
- **Asif Saif Uddin**
- **Omer Katz**
- **Brett Jackson**
- **Bruno Alla**
- **:github_user:`tothegump`**
- **Bojan Jovanovic**
- **Florian Chardin**
- **:github_user:`walterqian`**
- **Fabian Becker**
- **Lars Rinn**
- **:github_user:`madprogrammer`**
- **Ciaran Courtney**
Documentation Fixes by:
- **Lewis M. Kabui**
- **Dash Winterson**
- **Shanavas M**
- **Brett Randall**
- **Przemysław Suliga**
- **Joshua Schmid**
- **Asif Saif Uddin**
- **Xiaodong**
- **Vikas Prasad**
- **Jamie Alessio**
- **Lars Kruse**
- **Guilherme Caminha**
- **Andrea Rabbaglietti**
- **Itay Bittan**
- **Noah Hall**
- **Peng Weikang**
- **Mariatta Wijaya**
- **Ed Morley**
- **Paweł Adamczak**
- **:github_user:`CoffeeExpress`**
- **:github_user:`aviadatsnyk`**
- **Brian Schrader**
- **Josue Balandrano Coronel**
- **Tom Clancy**
- **Sebastian Wojciechowski**
- **Meysam Azad**
- **Willem Thiart**
- **Charles Chan**
- **Omer Katz**
- **Milind Shakya**