Browse Source

tell how to configure settings

Ask Solem 11 years ago
parent
commit
3b4ea1f8bc
1 changed files with 16 additions and 0 deletions
  1. 16 0
      docs/userguide/periodic-tasks.rst

+ 16 - 0
docs/userguide/periodic-tasks.rst

@@ -37,6 +37,14 @@ An example time zone could be `Europe/London`:
 
 
     CELERY_TIMEZONE = 'Europe/London'
     CELERY_TIMEZONE = 'Europe/London'
 
 
+
+This setting must be added to your app, either by configuration it directly
+using (``app.conf.CELERY_TIMEZONE = 'Europe/London'``), or by adding
+it to your configuration module if you have set one up using
+``app.config_from_object``.  See :ref:`celerytut-configuration` for
+more information about configuration options.
+
+
 The default scheduler (storing the schedule in the :file:`celerybeat-schedule`
 The default scheduler (storing the schedule in the :file:`celerybeat-schedule`
 file) will automatically detect that the time zone has changed, and so will
 file) will automatically detect that the time zone has changed, and so will
 reset the schedule itself, but other schedulers may not be so smart (e.g. the
 reset the schedule itself, but other schedulers may not be so smart (e.g. the
@@ -85,6 +93,14 @@ Example: Run the `tasks.add` task every 30 seconds.
 
 
     CELERY_TIMEZONE = 'UTC'
     CELERY_TIMEZONE = 'UTC'
 
 
+
+.. note::
+
+    If you are wondering where these settings should go then
+    please see :ref:`celerytut-configuration`.  You can either
+    set these options on your app directly or you can keep
+    a separate module for configuration.
+
 Using a :class:`~datetime.timedelta` for the schedule means the task will
 Using a :class:`~datetime.timedelta` for the schedule means the task will
 be sent in 30 second intervals (the first task will be sent 30 seconds
 be sent in 30 second intervals (the first task will be sent 30 seconds
 after `celery beat` starts, and then every 30 seconds
 after `celery beat` starts, and then every 30 seconds