| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Missing redis key containg set of queues bound to queue is caused
by removal all queues from the exchange. Hence, we should not raise an
exception but just return empty list of queues instead. This commit
fixes e.g. case publishing message against empty exchange:
import kombu
conn = kombu.Connection('redis://')
exchange = kombu.Exchange('name', type='direct')
exchange.declare(channel=conn.default_channel)
producer = conn.Producer()
producer.publish(
{'hello': 'world'},
exchange=exchange,
routing_key='queue1'
)
But it also fixes the case when last queue is unbound from exchange and
after publishing to this exchange:
import kombu
conn = kombu.Connection('redis://')
exchange = kombu.Exchange('name', type='direct')
queue1 = kombu.Queue('queue1', exchange=exchange, routing_key='queue1')
exchange.declare(channel=conn.default_channel)
queue1 = queue1.bind(channel=conn.default_channel)
queue1.declare()
producer = conn.Producer()
producer.publish(
{'hello': 'world'},
exchange=exchange,
routing_key='queue1'
)
queue1.delete()
producer.publish(
{'hello': 'world'},
exchange=exchange,
routing_key='queue1'
)
|
|
|
|
|
|
|
|
|
| |
* fix flake8 in kombu/asynchronous/aws/connection.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
oid is not cached anymore due race conditions of oid in celery. Caching
oid is causing following exception:
OperationalError("
Cannot route message for exchange 'reply.celery.pidbox': Table empty or key no longer exists.
Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database.
",)
This exception seems to be occuring when multiple celery workers
contains same oid.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.26.0 → v2.28.0](https://github.com/asottile/pyupgrade/compare/v2.26.0...v2.28.0)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
* v 1.4.x
|
|/ |
|
| |
|
|
|
|
|
|
| |
Add missing DEL, RPUSH, RPOP and SREM commands to the list of commands to prefix.
Also, this commit refactors the prefixing logic a bit to make it simpler.
|
|
|
|
| |
Co-authored-by: Steven Joseph <steven@pointzi.com>
Co-authored-by: Steven Joseph <steven@stevenjoseph.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Introduce global key prefix for redis transport
Co-authored-by: Matus Valo <matusvalo@users.noreply.github.com>
* refactor: use a custom redis client
As per the suggestions, refactor the redis key prefixing to use a custom
redis client that prefixes the keys it uses.
The custom client implementation does not prefix every key by default as
the way of prefixing keys may differ for some redis commands, instead it
lists those keys that will be prefixed. In case of commands, where
multiple keys can be passed as an argument, the custom client defines
where the arg positions are starting and ending for the given command.
* test: fix unit tests by moving import statement
* fix: wrap redis.parse_response to remove key prefixes
Co-authored-by: Matus Valo <matusvalo@users.noreply.github.com>
* fix: typo
* fix: lint
Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
Co-authored-by: Matus Valo <matusvalo@users.noreply.github.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
|
|
|
|
| |
Previously, calling `reject` when `predefined_queues` was not configured would cause `AttributeError` to be raised from `_extract_backoff_policy_configuration_and_message`. That exception could crash the whole Celery worker and force it to exit early because `AttributeError` is not excepted in the nearby call stack.
|
| |
|
|
|
| |
Only use simplejson if it's absolutely necessary - Python's built-in json module is better if it's available.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* enable pre-commit
* use extend-ignore for flake8
* manual flake8 fixes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update kombu/__init__.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
* feat: add support for setting redis username
* tests: add redis connparams credentials tests
|
| |
|
| |
|
|
|
|
|
| |
* Fix broken nested() after #1320
* Remove backward compatible code not needed anymore
|
| |
|
| |
|
|
|
|
|
|
|
| |
KeyError (#1343)
* Fix broken nested() after #1320
* prepare_accept_content now raises SerializerNotInstalled when wrong serializer alias is passed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add accept parameter to SimpleQueue class
* Fixed missing accept for get_nowait() and added unittests
* Remove unused **kwargs from SimpleQueue.__init__
* Use self.consumer.accept instead of new attribute in SimpleQueue
* Add tests for simple interface when accept=[]
Co-authored-by: Matus Valo <matusvalo@gmail.com>
|
|
|
| |
This reverts commit 3b6cd13d3b6da22f86a23b93b66c49133776cc75.
|
|
|
|
|
| |
* chore: refactor code quality issues
* remove .deepsource.toml config file
|
|
|
|
|
| |
* Make flake8 happy
* Make pydocstyle happy
|
|
|
|
|
| |
Celery does not coerce configuration values into the right type (See celery/celery#6696).
This is a workaround. This bug will be fixed in Celery NextGen when we will refactor our configuration subsystem.
|
| |
|
|
|
|
|
|
|
|
|
| |
* fixed character replace table according to the comment above - dots replaced by dashes, other punctuations replaced by underscores
* optimised with precalculated punctuation set - according to @thedrow suggestion
* queue name tests
* cleanup
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use a thread-safe implementation of cached_property.
* Restore setter and deleter.
* Restore tests.
* Fix __get__ signature for backport.
* Cleanup.
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* handle sqs sts
* add doc
* use string format
* improve docs
* Update kombu/transport/SQS.py
Co-authored-by: Omer Katz <omer.drow@gmail.com>
* add helper method and tests
* changer to private
Co-authored-by: galcohen <gal.cohen@autodesk.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Omer Katz <omer.drow@gmail.com>
|
|
|
| |
- AMQPLAIN is only retained for backwards compatability and has become non-standard
|
|
|
|
|
| |
https://docs.python.org/3.9/whatsnew/3.0.html#library-changes
> A common pattern in Python 2.x is to have one version of a module implemented in pure Python, with an optional accelerated version implemented as a C extension; for example, pickle and cPickle. This places the burden of importing the accelerated version and falling back on the pure Python version on each user of these modules. In Python 3.0, the accelerated versions are considered implementation details of the pure Python versions. Users should always import the standard version, which attempts to import the accelerated version and falls back to the pure Python version. The pickle / cPickle pair received this treatment.
|
| |
|
|
|
|
|
| |
Based on my headaches with silent revert to `localhost` I submit this PR.
The developer should be notified if their host settings are not found.
Details on the issue are here: https://github.com/celery/celery/issues/6661
|
|
|
|
|
| |
Protocol version 4 was added in Python 3.4 and is supported by all Python versions that kombu supports.
https://docs.python.org/3.9/library/pickle.html#data-stream-format
|
|
|
|
|
|
|
| |
* fix: non kombu json message decoding in SQS transport
* fix: non kombu json message decoding in SQS transport - add tests
Co-authored-by: Max Nikitenko <max.nikitenko@namecheap.com>
|
|
|
| |
This reverts commit 753f4ec174916f9c4c38c52cbf73a49cf66bad29.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Port of redis code improvements from prior revision
Add fakeredis requirement
* refine variable naming based on PR feedback.
* Remove python2 code style and remove unittest.Testcase from test_redis.py
* Code refactor of redis.py and test_redis.py
Co-authored-by: Matus Valo <matusvalo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sqs retry policy
* add test
* method definition
* add validation
* rename policy
* add kombu doc
* improve docstring
* add test and doc
* test fix
* test fixes
* add doc
* Update docs/reference/kombu.transport.SQS.rst
Co-authored-by: Omer Katz <omer.drow@gmail.com>
* Update docs/reference/kombu.transport.SQS.rst
Co-authored-by: Omer Katz <omer.drow@gmail.com>
* Update kombu/transport/SQS.py
Co-authored-by: Omer Katz <omer.drow@gmail.com>
* Update kombu/transport/SQS.py
Co-authored-by: Omer Katz <omer.drow@gmail.com>
* Update kombu/transport/SQS.py
Co-authored-by: Omer Katz <omer.drow@gmail.com>
* review improvements
* improvements
* add improvements
* rename
Co-authored-by: galcohen <gal.cohen@autodesk.com>
Co-authored-by: Omer Katz <omer.drow@gmail.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Allow specifying session token
* add docs
* add comment
|
|
|
|
|
| |
* Started servicebus refactor
* Cleaned up, handle service bus SAS token parsing
|
|
|
|
|
|
| |
There is a small typo in kombu/asynchronous/http/base.py.
Should read `property` rather than `propery`.
|