Commit Graph

2928 Commits

Author SHA1 Message Date
Vsevolod Strukchinsky b3dc920883 Fix infinity loop in create_loop (#923) 2018-09-27 21:38:21 +06:00
Bruno Alla 62087a67cf Fix a deprecation warning about logger.warn() (#924)
* Fix a deprecation warning about logger.warn()

This fixes a deprecation warning from the standard library's logging module:

> The 'warn' method is deprecated, use 'warning' instead

* Update test
2018-09-27 19:12:44 +06:00
Asif Saif Uddin 5f9261d125
added retry=True (#920) 2018-09-26 15:17:06 +06:00
Jon Dufresne 942a6daba9 Correct capitalization of PyPI (#919)
As spelled on https://pypi.org/.
2018-09-17 07:49:47 +06:00
Asif Saif Uddin (Auvi) ddb0c8ffad
Jython (#915)
* drop jython from tox

* drop jython from setup.py
2018-09-05 18:42:04 +06:00
Clemens Wolff 32633554ac Add transports based on Azure PaaS (#891)
* Add transports based on Azure PaaS

This pull request adds two new transport implementations:

- `azurestoragequeues` is implemented on top of Azure Storage
  Queues [1]. This offers a simple but scalable and low-cost PaaS
  transport for Celery users in Azure. The transport is intended to be
  used in conjunction with the Azure Block Blob Storage backend [2].

- `azureservicebus` is implemented on top of Azure Service Bus [3] and
  offers PaaS support for more demanding Celery workloads in Azure. The
  transport is intended to be used in conjunction with the Azure
  CosmosDB backend [4].

This pull request was created together with @ankurokok, @dkisselev,
@evandropaula, @martinpeck and @michaelperel.

[1] https://azure.microsoft.com/en-us/services/storage/queues/
[2] https://github.com/celery/celery/pull/4685
[3] https://azure.microsoft.com/en-us/services/service-bus/
[4] https://github.com/celery/celery/pull/4720

* Exclude Azure transports from code coverage

There is test coverage for the transports but the tests require Azure
credentials to run (passed via environment variables) so codecov doesn't
exercise them.

* Remove env vars to configure transport

* Remove abbreviations
2018-08-30 23:34:52 +06:00
Daniel Blair 200a60a228 Add support for 'rediss' scheme for secure redis connections. (#910)
Putting a 'rediss'-specific check into a generic connection module feels
like a code smell but there doesn't appear to be another way to intercept
the connection initiation code. It defaults to the least secure form, as
there is no suitable default location for `ca_certs`. The recommendation
would still be to follow the documentation and specify `broker_use_ssl` if
coming from celery.
2018-08-27 13:26:07 +03:00
Omer Katz b59bf1b679
Added Python 3.7 to the build matrix (#908)
* Run tests with Python 3.7.

* Add missing dependencies.

* Show skip reasons.

* Add more dependencies to CI tests.

* Fix requirements.
2018-08-16 07:53:25 -05:00
Omer Katz 6939d93d7f
Added tests that verify that librabbitmq is selected when available and not selected when it is not available. (#907) 2018-08-16 04:48:33 -05:00
C Blue Neeh 9e64dafa61 Allow SimpleQueue to pass 'queue_arguments' to Queue object. (#900)
* Update SimpleQueue for queue_arguments passing

Allow SimpleQueue to pass queue_arguments to Queue object.

This allows SimpleQueue to connect to RabbitMQ queues with custom arguments like 'x-queue-mode'='lazy'.

* Missed indent

* remove trailing space

* add 'queue_args' to arguments (and documentation) for SimpleQueue

Signed-off-by: Blue Cuenca <blue.cuenca@gmail.com>

* add test to verify new argument 'queue_args'.

Signed-off-by: Blue Cuenca <blue.cuenca@gmail.com>
2018-08-16 04:00:50 -05:00
gal cohen a307726faa on worker restart - restore visible regardless to time (#905)
* on worker restart - restore visiable regardless to timme

* add test

* rename test

* rename test

* pep8

* flake8
2018-08-15 17:12:45 +06:00
KUAN Hsuan-Tso 87d6423289 fix/Broadcast-fail-by-give-queue-kwargs (#906)
* If give queue kwargs broadcast will fail

Because give Broadcast(name='xxx', queue='xxx'),
it will create one specific name for queue,
and if launch more worker for consuming this queue,
this specific name queue already exist then it will not create new queue to
binding fanout exchange.
So all worker will consuming same queue, and exchange only binding this
queue then lose the effect of broadcasting.

* modify test_Broadcast
2018-08-15 16:59:33 +06:00
Antonio Gutierrez 1160b92c27 Queue: add handling of Exchange as str to constructor (#904)
To fit with the documentation, Queue can now handle a str argument for
the exchange parameter in the constructor, as well as an actual Exchange
object.
Added relevant unit tests to avoid regressions.

Fixes: https://github.com/celery/kombu/issues/903

Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
2018-08-12 08:59:27 +06:00
Alan Justino da Silva 073001e341 "Reentrant" version, that allows a `celery.bin.celery.main` worker to run multiple times (#866)
* Regenerate poll()s of Hub and Redis, after shutdown

Allows the same Python process to bring a new Worker
after a shutdown (SystemExit) rescued.

See: https://botbot.me/freenode/celery/2018-04-16/?msg=99046233&page=2

* Hub.poller is now a @property

* Fixed tests that supose .poller to be settable to None

* Test hub.pooler regeneration

* No need to regenerate poller on Redis if the Hub behaves nicely
2018-08-10 17:42:50 +06:00
tothegump 152923594f Add timeout to retry_over_time (#880)
add ut
2018-08-09 16:55:30 +03:00
Mikhail Shcherbinin 0c740a7b58 Index in sqlalchemy transport for quick sorting (#850) 2018-08-09 16:50:53 +03:00
Matt Yule-Bennett e2a59094c2 don't cache declaration of expiring queues (#884) 2018-08-09 16:49:34 +03:00
Asif Saifuddin Auvi baf488bdaf
Added python 3.7 to classifier 2018-06-28 18:44:01 +06:00
Jon Dufresne 675216fe98 Update pypi.python.org URL to pypi.org (#893) 2018-06-27 19:52:45 +06:00
程飞 080502fd5c fix librabbitmq link error (#889) 2018-06-13 13:55:51 +03:00
Jon Dufresne cb516bbf74 Update all pypi.python.org URLs to pypi.org (#885)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-06-10 16:40:04 +06:00
Omer Katz c627c6d9d1
Bump version: 4.2.0 → 4.2.1 2018-05-30 17:07:29 +03:00
Omer Katz 736d1909ba
Updated changelog. 2018-05-30 17:07:24 +03:00
Sławomir Ehlert 25cafc4f5f Remove data_files from setup.py (#882)
Fixes #881

Also add some blank lines for pep-8 compatibility
2018-05-30 16:18:13 +03:00
Omer Katz e8e92af89e
Bump stable version for docs. 2018-05-28 16:57:51 +03:00
Omer Katz e7fee62836
Ignore .pytest_cache. 2018-05-28 16:57:51 +03:00
Bryan Shelton b0512725f6 Handle librabbitmq fileno socket not connected raising ValueError (#878)
* Handle librabbitmq fileno socket not connected raises ValueError

* Test client objects set to None

* Assert that librabbitmq's conn.fileno is called
2018-05-27 20:54:37 +06:00
Omer Katz b975713d81
Bump version: 4.1.0 → 4.2.0 2018-05-21 08:48:16 +03:00
Omer Katz 3bc949d63a
Actually run linters first. 2018-05-20 11:33:02 +03:00
Omer Katz e824ba1b96
Cleaned up redundant call of PY3 constants. (#869) 2018-05-20 11:28:56 +03:00
Omer Katz b5ef2d7571
Run linters first in CI. 2018-05-20 11:12:16 +03:00
Omer Katz c1351f59df
Use pytest-sugar for output. 2018-05-20 11:02:41 +03:00
Asif Saifuddin Auvi 629879b422
clened up redundant call of PY3 constants (#856) 2018-04-30 00:20:05 +06:00
Asif Saifuddin Auvi 491d7f389b
used unittest and remove unittest2 (#855) 2018-04-29 23:46:59 +06:00
Asif Saifuddin Auvi 824491b972
Cleaned up redundant PY3 constants (#854)
* Cleaned up redundent PY3 constants in utils/encoding

* Cleaned up redundent PY3 constants in utils/json

* fixed flake8 error
2018-04-29 22:01:35 +06:00
Alex Hill 0f6ef8c90b Update Changelog for 4.2.0 (#848)
I've gone through the commits since the last tag and added them, grouping the minor tweaks/fixups and doc changes. I think I've got everything.

Incidentally I've left a question in #689 but that needn't prevent release.
2018-04-16 16:39:06 +06:00
Jon Dufresne c9ea79f0f9 Pass python_requires argument to setuptools (#847)
Helps pip decide what version of the library to install.

https://packaging.python.org/tutorials/distributing-packages/#python-requires

> If your project only runs on certain Python versions, setting the
> python_requires argument to the appropriate PEP 440 version specifier
> string will prevent pip from installing the project on other Python
> versions.

https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords

> python_requires
>
> A string corresponding to a version specifier (as defined in PEP 440)
> for the Python version, used to specify the Requires-Python defined in
> PEP 345.
2018-04-12 17:31:53 +06:00
Radha Krishna. S b19bb3dd32 Fixed mailing list detail (#846)
Fixed mailing list detail in Getting Help section
2018-04-10 00:25:44 +06:00
Alex Hill f246a66bed Prevent spurious exception on Resource.resize(0) (#826)
* Prevent spurious exception on Resource.resize(0)

`Resource.resize()` raises an exception if the pool is in use and the new size is smaller than the old size. However, it also raises this exception when the new size is zero, which should correspond to disabling the pool. Instead of shrinking the pool to zero and releasing all resources, we can simply dequeue all resources and forget about them.

* Add test for removing pool limit when in use
2018-04-08 12:06:02 +06:00
Jonas Lergell fdb8318aaf Add ConsumerProducerMixin to __all__ in mixins.py (#840) 2018-04-02 11:57:42 +03:00
Omer Katz 20aaab49df
Comment out 3.7 since the beta is not available in appveyor. 2018-03-23 10:45:46 +03:00
Thomas Achtemichuk 75695205f6 Rename `async` keyword to `asynchronous` (#839)
* Rename `async` keyword to `asynchronous`

* Fixes #742
* Resolves "DeprecationWarning: 'async' and 'await' will become reserved
  keywords in Python 3.7"

* Address PR feedback

* Update appveyor config

* Rename docs and tests
2018-03-19 19:28:43 +02:00
Omer Katz dba85e2d95
Always report coverage (#837)
* Always report coverage.

* Remove useless coverage env run.

* Remove useless cov testenv.
2018-03-05 23:47:28 +02:00
Omer Katz 7d13f9b95d
Enable pip cache in appveyor. 2018-02-20 12:55:59 +02:00
Asif Saifuddin Auvi e387a16368
update version tag to 4.2.0 2018-02-06 16:24:01 +06:00
John Koehl 39e733c143 Fixes #791 - SQS queue name gets mangled in Python 2.7 environment (#794)
* Fixes #791

* Changing to recommended patch by @georgepsarakis

* Revert "Fixes #791"

This reverts commit 5593505dd9.

* Updated to make tests pass

* Made _ensure_str a private function

* Code formatting for flake8

* Added a mock of the newstr and newbytes classes to create a failing test that simulates the issue with using python-future under 2.7.
2018-01-28 09:21:05 +02:00
Mads Jensen c13d91634d Removed an always true if-check in t/integration/transport.py (#827) 2018-01-27 11:22:49 +02:00
Mads Jensen 537e973e7e Replaced a dict-construct with a dictionary comprehension. (#828) 2018-01-27 11:22:12 +02:00
Harry Moreno 16ea4df217 Fix rabbit and warrens link (#825)
* fixes #793
2018-01-16 09:18:44 +06:00
Arcadiy Ivanov 2f9eb53128 Virtual transport timeout does not supesede period polling (#689)
fixes #688
2018-01-13 22:39:34 +06:00