Explorar o código

Merge branch 'fredj/master'

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
3e55935fd5

+ 3 - 1
docs/reference/celery.conf.rst

@@ -275,12 +275,14 @@ Celeryd
 .. data:: CELERYD_CONCURRENCY
 
     The number of concurrent worker processes.
-    If set to ``0``, the total number of available CPUs/cores will be used.
+    If set to ``0`` (the default), the total number of available CPUs/cores
+    will be used.
 
 .. data:: CELERYD_PREFETCH_MULTIPLIER
 
     The number of concurrent workers is multipled by this number to yield
     the wanted AMQP QoS message prefetch count.
+    Default is: ``4``
 
 .. data:: CELERYD_POOL
 

+ 1 - 1
docs/reference/celery.signals.rst

@@ -19,7 +19,7 @@ Example connecting to the :data:`task_sent` signal:
     from celery.signals import task_sent
 
     def task_sent_handler(sender=None, task_id=None, task=None, args=None,
-            kwargs=None, \*\*kwds):
+                          kwargs=None, **kwds):
         print("Got signal task_sent for task id %s" % (task_id, ))
 
     task_sent.connect(task_sent_handler)

+ 1 - 1
docs/tutorials/clickcounter.rst

@@ -218,7 +218,7 @@ Processing the clicks every 30 minutes is easy using celery periodic tasks.
     class ProcessClicksTask(PeriodicTask):
         run_every = timedelta(minutes=30)
 
-        def run(self, \*\*kwargs):
+        def run(self, **kwargs):
             process_clicks()
 
 We subclass from :class:`celery.task.base.PeriodicTask`, set the ``run_every``

+ 2 - 2
docs/userguide/tasks.rst

@@ -540,12 +540,12 @@ Good:
 
     @task(ignore_result=True)
     def fetch_page(url, callback=None):
-        page = myparser.parse_document(page)
+        page = myhttplib.get(url)
         if callback:
             # The callback may have been serialized with JSON,
             # so best practice is to convert the subtask dict back
             # into a subtask object.
-            subtask(callback).delay(page)
+            subtask(callback).delay(url, page)
 
     @task(ignore_result=True)
     def parse_page(url, page, callback=None):