ソースを参照

an URL -> a URL

Ask Solem 9 年 前
コミット
58ac81bd81

+ 9 - 3
celery/app/base.py

@@ -705,7 +705,7 @@ class Celery(object):
         :param url: Either the URL or the hostname of the broker to use.
         :param url: Either the URL or the hostname of the broker to use.
 
 
         :keyword hostname: URL, Hostname/IP-address of the broker.
         :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.
             be taken from the URL instead.
         :keyword userid: Username to authenticate as.
         :keyword userid: Username to authenticate as.
         :keyword password: Password to authenticate with
         :keyword password: Password to authenticate with
@@ -940,6 +940,10 @@ class Celery(object):
         :keyword name: Custom name for the target class.
         :keyword name: Custom name for the target class.
         :keyword attribute: Name of the attribute holding the app,
         :keyword attribute: Name of the attribute holding the app,
                             default is '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)
         Class = symbol_by_name(Class)
@@ -948,8 +952,10 @@ class Celery(object):
         def __reduce__(self):
         def __reduce__(self):
             return _unpickle_appattr, (reverse, self.__reduce_args__())
             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:
         if not keep_reduce:
             attrs['__reduce__'] = __reduce__
             attrs['__reduce__'] = __reduce__
 
 

+ 2 - 2
celery/task/http.py

@@ -169,7 +169,7 @@ class HttpDispatch(object):
 
 
 @shared_task(name='celery.http_dispatch', bind=True, url=None, method=None)
 @shared_task(name='celery.http_dispatch', bind=True, url=None, method=None)
 def dispatch(self, url=None, method='GET', **kwargs):
 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 url: The URL location of the HTTP callback task.
     :keyword method: Method to use when dispatching the callback. Usually
     :keyword method: Method to use when dispatching the callback. Usually
@@ -197,7 +197,7 @@ def dispatch(self, url=None, method='GET', **kwargs):
 class URL(MutableURL):
 class URL(MutableURL):
     """HTTP Callback URL
     """HTTP Callback URL
 
 
-    Supports requesting an URL asynchronously.
+    Supports requesting a URL asynchronously.
 
 
     :param url: URL to request.
     :param url: URL to request.
     :keyword dispatcher: Class used to dispatch the request.
     :keyword dispatcher: Class used to dispatch the request.

+ 1 - 1
docs/configuration.rst

@@ -1567,7 +1567,7 @@ Broker Settings
 ``broker_url``
 ``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
     transport://userid:password@hostname:port/virtual_host
 
 

+ 2 - 2
docs/history/changelog-2.4.rst

@@ -167,7 +167,7 @@ Important Notes
 
 
 * Broker transports can be now be specified using URLs
 * 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:
     This URL must have the format:
 
 
     .. code-block:: text
     .. code-block:: text
@@ -181,7 +181,7 @@ Important Notes
         amqp://guest:guest@localhost:5672//
         amqp://guest:guest@localhost:5672//
 
 
     The scheme is required, so that the host is identified
     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
     User, password, port and virtual_host are optional and
     defaults to the particular transports default value.
     defaults to the particular transports default value.
 
 

+ 1 - 1
docs/history/whatsnew-3.0.rst

@@ -737,7 +737,7 @@ In Other News
 
 
         app = Celery(broker='redis://')
         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:
     Currently only supported by redis.  Example use:
 
 

+ 1 - 1
docs/userguide/workers.rst

@@ -1008,7 +1008,7 @@ The output will include the following fields:
 
 
     * ``uri_prefix``
     * ``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:
         for example SQLAlchemy where the host name part is the connection URI:
 
 
         .. code-block:: text
         .. code-block:: text

+ 1 - 1
docs/whatsnew-3.1.rst

@@ -1030,7 +1030,7 @@ In Other News
 
 
 - ``celery.platforms.PIDFile`` renamed to :class:`celery.platforms.Pidfile`.
 - ``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`.
     See :ref:`example-mongodb-result-config`.
 
 

+ 2 - 2
examples/eventlet/webcrawler.py

@@ -5,7 +5,7 @@ For asynchronous DNS lookups install the `dnspython` package:
     $ pip install dnspython
     $ pip install dnspython
 
 
 Requires the `pybloom` module for the bloom filter which is used
 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
 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
 to each subtask, it would be much better to have this as a centralized
@@ -41,7 +41,7 @@ url_regex = re.compile(
 
 
 
 
 def domain(url):
 def domain(url):
-    """Return the domain part of an URL."""
+    """Return the domain part of a URL."""
     return urlsplit(url)[1].split(':')[0]
     return urlsplit(url)[1].split(':')[0]