Skip to content

Commit

Permalink
an URL -> a URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed May 13, 2016
1 parent 1a328ab commit 58ac81b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 13 deletions.
12 changes: 9 additions & 3 deletions celery/app/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def connection(self, hostname=None, userid=None, password=None,
:param url: Either the URL or the hostname of the broker to use.
:keyword hostname: URL, Hostname/IP-address of the broker.
If an URL is used, then the other argument below will
If a URL is used, then the other argument below will
be taken from the URL instead.
:keyword userid: Username to authenticate as.
:keyword password: Password to authenticate with
Expand Down Expand Up @@ -940,6 +940,10 @@ def subclass_with_self(self, Class, name=None, attribute='app',
:keyword name: Custom name for the target class.
:keyword attribute: Name of the attribute holding the app,
default is 'app'.
:keyword reverse: Reverse path to this object used for pickling
purposes. E.g. for ``app.AsyncResult`` use ``"AsyncResult"``.
:keyword keep_reduce: If enabled a custom ``__reduce__`` implementation
will not be provided.
"""
Class = symbol_by_name(Class)
Expand All @@ -948,8 +952,10 @@ def subclass_with_self(self, Class, name=None, attribute='app',
def __reduce__(self):
return _unpickle_appattr, (reverse, self.__reduce_args__())

attrs = dict({attribute: self}, __module__=Class.__module__,
__doc__=Class.__doc__, **kw)
attrs = dict({attribute: self},
__module__=Class.__module__,
__doc__=Class.__doc__,
**kw)
if not keep_reduce:
attrs['__reduce__'] = __reduce__

Expand Down
4 changes: 2 additions & 2 deletions celery/task/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def http_headers(self):

@shared_task(name='celery.http_dispatch', bind=True, url=None, method=None)
def dispatch(self, url=None, method='GET', **kwargs):
"""Task dispatching to an URL.
"""Task dispatching to a URL.
:keyword url: The URL location of the HTTP callback task.
:keyword method: Method to use when dispatching the callback. Usually
Expand Down Expand Up @@ -197,7 +197,7 @@ def dispatch(self, url=None, method='GET', **kwargs):
class URL(MutableURL):
"""HTTP Callback URL
Supports requesting an URL asynchronously.
Supports requesting a URL asynchronously.
:param url: URL to request.
:keyword dispatcher: Class used to dispatch the request.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ Broker Settings
``broker_url``
~~~~~~~~~~~~~~
Default broker URL. This must be an URL in the form of::
Default broker URL. This must be a URL in the form of::
transport://userid:password@hostname:port/virtual_host
Expand Down
4 changes: 2 additions & 2 deletions docs/history/changelog-2.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Important Notes

* Broker transports can be now be specified using URLs

The broker can now be specified as an URL instead.
The broker can now be specified as a URL instead.
This URL must have the format:

.. code-block:: text
Expand All @@ -181,7 +181,7 @@ Important Notes
amqp://guest:guest@localhost:5672//
The scheme is required, so that the host is identified
as an URL and not just a host name.
as a URL and not just a host name.
User, password, port and virtual_host are optional and
defaults to the particular transports default value.

Expand Down
2 changes: 1 addition & 1 deletion docs/history/whatsnew-3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ In Other News
app = Celery(broker='redis://')
- Result backends can now be set using an URL
- Result backends can now be set using a URL

Currently only supported by redis. Example use:

Expand Down
2 changes: 1 addition & 1 deletion docs/userguide/workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ The output will include the following fields:

* ``uri_prefix``

Some transports expects the host name to be an URL, this applies to
Some transports expects the host name to be a URL, this applies to
for example SQLAlchemy where the host name part is the connection URI:

.. code-block:: text
Expand Down
2 changes: 1 addition & 1 deletion docs/whatsnew-3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ In Other News

- ``celery.platforms.PIDFile`` renamed to :class:`celery.platforms.Pidfile`.

- MongoDB Backend: Can now be configured using an URL:
- MongoDB Backend: Can now be configured using a URL:

See :ref:`example-mongodb-result-config`.

Expand Down
4 changes: 2 additions & 2 deletions examples/eventlet/webcrawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$ pip install dnspython
Requires the `pybloom` module for the bloom filter which is used
to ensure a lower chance of recrawling an URL previously seen.
to ensure a lower chance of recrawling a URL previously seen.
Since the bloom filter is not shared, but only passed as an argument
to each subtask, it would be much better to have this as a centralized
Expand Down Expand Up @@ -41,7 +41,7 @@


def domain(url):
"""Return the domain part of an URL."""
"""Return the domain part of a URL."""
return urlsplit(url)[1].split(':')[0]


Expand Down

0 comments on commit 58ac81b

Please sign in to comment.