Просмотр исходного кода

Merge branch 'master' of github.com:celery/celery

Ask Solem 12 лет назад
Родитель
Сommit
707fdb39d0
2 измененных файлов с 10 добавлено и 5 удалено
  1. 4 5
      docs/configuration.rst
  2. 6 0
      docs/userguide/signals.rst

+ 4 - 5
docs/configuration.rst

@@ -1387,11 +1387,10 @@ CELERYD_HIJACK_ROOT_LOGGER
 
 .. versionadded:: 2.2
 
-By default any previously configured logging options will be reset,
-because the Celery programs "hijacks" the root logger.
-
-If you want to customize your own logging then you can disable
-this behavior.
+By default any previously configured handlers on the root logger will be
+removed. If you want to customize your own logging handlers, then you
+can disable this behavior by setting
+`CELERYD_HIJACK_ROOT_LOGGER = False`.
 
 .. note::
 

+ 6 - 0
docs/userguide/signals.rst

@@ -46,6 +46,12 @@ has been sent by providing the `sender` argument to
                           kwargs=None, **kwds):
         print('Got signal task_sent for task id {0}'.format(task_id)
 
+Signals use the same implementation as django.core.dispatch. As a result other
+keyword parameters (e.g. signal) are passed to all signal handlers by default.
+
+The best practice for signal handlers is to accept arbitrary keyword arguments (i.e. **kwargs).
+That way new celery versions can add additional arguments without breaking user code.
+
 .. _signal-ref:
 
 Signals