Browse Source

Finally: Configuration naming consistency. Old names deprecated in favor of:

CELERYD_DAEMON_LOG_FORMAT -> CELERYD_LOG_FORMAT
CELERYD_DAEMON_LOG_LEVEL -> CELERYD_LOG_LEVEL
CELERY_AMQP_CONNECTION_TIMEOUT -> CELERY_BROKER_CONNECTION_TIMEOUT
CELERY_AMQP_CONNECTION_RETRY -> CELERY_BROKER_CONNECTION_RETRY
CELERY_AMQP_CONNECTION_MAX_RETRIES -> CELERY_BROKER_CONNECTION_MAX_RETRIES
SEND_CELERY_TASK_ERROR_EMAILS -> CELERY_SEND_TASK_ERROR_EMAILS

The public api names in celery.conf has also changed to a consistent naming
scheme.
Ask Solem 15 years ago
parent
commit
890428d4c3

+ 7 - 7
celery/bin/celeryd.py

@@ -91,7 +91,7 @@ Configuration ->
 
 
 OPTION_LIST = (
 OPTION_LIST = (
     optparse.make_option('-c', '--concurrency',
     optparse.make_option('-c', '--concurrency',
-            default=conf.DAEMON_CONCURRENCY,
+            default=conf.CELERYD_CONCURRENCY,
             action="store", dest="concurrency", type="int",
             action="store", dest="concurrency", type="int",
             help="Number of child processes processing the queue."),
             help="Number of child processes processing the queue."),
     optparse.make_option('--discard', default=False,
     optparse.make_option('--discard', default=False,
@@ -99,13 +99,13 @@ OPTION_LIST = (
             help="Discard all waiting tasks before the server is started. "
             help="Discard all waiting tasks before the server is started. "
                  "WARNING: This is unrecoverable, and the tasks will be "
                  "WARNING: This is unrecoverable, and the tasks will be "
                  "deleted from the messaging server."),
                  "deleted from the messaging server."),
-    optparse.make_option('-f', '--logfile', default=conf.DAEMON_LOG_FILE,
+    optparse.make_option('-f', '--logfile', default=conf.CELERYD_LOG_FILE,
             action="store", dest="logfile",
             action="store", dest="logfile",
             help="Path to log file."),
             help="Path to log file."),
-    optparse.make_option('-l', '--loglevel', default=conf.DAEMON_LOG_LEVEL,
+    optparse.make_option('-l', '--loglevel', default=conf.CELERYD_LOG_LEVEL,
             action="store", dest="loglevel",
             action="store", dest="loglevel",
             help="Choose between DEBUG/INFO/WARNING/ERROR/CRITICAL/FATAL."),
             help="Choose between DEBUG/INFO/WARNING/ERROR/CRITICAL/FATAL."),
-    optparse.make_option('-p', '--pidfile', default=conf.DAEMON_PID_FILE,
+    optparse.make_option('-p', '--pidfile', default=conf.CELERYD_PID_FILE,
             action="store", dest="pidfile",
             action="store", dest="pidfile",
             help="Path to pidfile."),
             help="Path to pidfile."),
     optparse.make_option('-B', '--beat', default=False,
     optparse.make_option('-B', '--beat', default=False,
@@ -136,9 +136,9 @@ OPTION_LIST = (
     )
     )
 
 
 
 
-def run_worker(concurrency=conf.DAEMON_CONCURRENCY, detach=False,
-        loglevel=conf.DAEMON_LOG_LEVEL, logfile=conf.DAEMON_LOG_FILE,
-        discard=False, pidfile=conf.DAEMON_PID_FILE, umask=0,
+def run_worker(concurrency=conf.CELERYD_CONCURRENCY, detach=False,
+        loglevel=conf.CELERYD_LOG_LEVEL, logfile=conf.CELERYD_LOG_FILE,
+        discard=False, pidfile=conf.CELERYD_PID_FILE, umask=0,
         uid=None, gid=None, working_directory=None,
         uid=None, gid=None, working_directory=None,
         chroot=None, run_clockservice=False, events=False, **kwargs):
         chroot=None, run_clockservice=False, events=False, **kwargs):
     """Starts the celery worker server."""
     """Starts the celery worker server."""

+ 50 - 30
celery/conf.py

@@ -12,39 +12,53 @@ LOG_LEVELS["FATAL"] = logging.FATAL
 LOG_LEVELS[logging.FATAL] = "FATAL"
 LOG_LEVELS[logging.FATAL] = "FATAL"
 
 
 _DEFAULTS = {
 _DEFAULTS = {
+    "CELERY_BACKEND": "database",
+    "CELERY_ALWAYS_EAGER": False,
+    "CELERY_TASK_RESULT_EXPIRES": timedelta(days=5),
+    "CELERY_SEND_EVENTS": False,
+    "CELERY_STORE_ERRORS_EVEN_IF_IGNORED": False,
+    "CELERY_TASK_SERIALIZER": "pickle",
+    "CELERY_DISABLE_RATE_LIMITS": False,
     "CELERY_DEFAULT_ROUTING_KEY": "celery",
     "CELERY_DEFAULT_ROUTING_KEY": "celery",
     "CELERY_DEFAULT_QUEUE": "celery",
     "CELERY_DEFAULT_QUEUE": "celery",
     "CELERY_DEFAULT_EXCHANGE": "celery",
     "CELERY_DEFAULT_EXCHANGE": "celery",
     "CELERY_DEFAULT_EXCHANGE_TYPE": "direct",
     "CELERY_DEFAULT_EXCHANGE_TYPE": "direct",
+    "CELERY_BROKER_CONNECTION_TIMEOUT": 4,
+    "CELERY_BROKER_CONNECTION_RETRY": True,
+    "CELERY_BROKER_CONNECTION_MAX_RETRIES": 100,
     "CELERYD_CONCURRENCY": 0, # defaults to cpu count
     "CELERYD_CONCURRENCY": 0, # defaults to cpu count
-    "CELERYD_PID_FILE": "celeryd.pid",
-    "CELERYD_DAEMON_LOG_FORMAT": DEFAULT_LOG_FMT,
-    "CELERYD_DAEMON_LOG_LEVEL": "WARN",
+    "CELERYD_LOG_FORMAT": DEFAULT_LOG_FMT,
+    "CELERYD_LOG_LEVEL": "WARN",
     "CELERYD_LOG_FILE": "celeryd.log",
     "CELERYD_LOG_FILE": "celeryd.log",
-    "CELERY_ALWAYS_EAGER": False,
-    "CELERY_TASK_RESULT_EXPIRES": timedelta(days=5),
-    "CELERY_AMQP_CONNECTION_TIMEOUT": 4,
-    "CELERY_AMQP_CONNECTION_RETRY": True,
-    "CELERY_AMQP_CONNECTION_MAX_RETRIES": 100,
-    "CELERY_TASK_SERIALIZER": "pickle",
-    "CELERY_BACKEND": "database",
-    "CELERY_DISABLE_RATE_LIMITS": False,
-    "CELERYBEAT_PID_FILE": "celerybeat.pid",
-    "CELERYBEAT_LOG_LEVEL": "INFO",
-    "CELERYBEAT_LOG_FILE": "celerybeat.log",
+    "CELERYD_PID_FILE": "celeryd.pid",
     "CELERYBEAT_SCHEDULE_FILENAME": "celerybeat-schedule",
     "CELERYBEAT_SCHEDULE_FILENAME": "celerybeat-schedule",
     "CELERYBEAT_MAX_LOOP_INTERVAL": 5 * 60, # five minutes.
     "CELERYBEAT_MAX_LOOP_INTERVAL": 5 * 60, # five minutes.
-    "CELERYMON_PID_FILE": "celerymon.pid",
+    "CELERYBEAT_LOG_LEVEL": "INFO",
+    "CELERYBEAT_LOG_FILE": "celerybeat.log",
+    "CELERYBEAT_PID_FILE": "celerybeat.pid",
     "CELERYMON_LOG_LEVEL": "INFO",
     "CELERYMON_LOG_LEVEL": "INFO",
     "CELERYMON_LOG_FILE": "celerymon.log",
     "CELERYMON_LOG_FILE": "celerymon.log",
-    "CELERY_SEND_EVENTS": False,
-    "CELERY_STORE_ERRORS_EVEN_IF_IGNORED": False,
+    "CELERYMON_PID_FILE": "celerymon.pid",
 }
 }
 
 
-def _get(name, default=None):
+_DEPRECATION_FMT = """
+%s is deprecated in favor of %s and is schedule for removal in celery v1.2.
+""".strip()
+
+def _get(name, default=None, compat=None):
+    compat = compat or []
     if default is None:
     if default is None:
         default = _DEFAULTS.get(name)
         default = _DEFAULTS.get(name)
-    return getattr(settings, name, default)
+    compat = [name] + compat
+    for i, alias in enumerate(compat):
+        try:
+            value = getattr(settings, name)
+            i > 0 and warnings.warn(DeprecationWarning(_DEPRECATION_FMT % (
+                                                        alias, name)))
+            return value
+        except AttributeError:
+            pass
+    return default
 
 
 # <--- Task options                                <-   --   --- - ----- -- #
 # <--- Task options                                <-   --   --- - ----- -- #
 ALWAYS_EAGER = _get("CELERY_ALWAYS_EAGER")
 ALWAYS_EAGER = _get("CELERY_ALWAYS_EAGER")
@@ -62,14 +76,17 @@ SEND_EVENTS = _get("CELERY_SEND_EVENTS")
 DEFAULT_RATE_LIMIT = _get("CELERY_DEFAULT_RATE_LIMIT")
 DEFAULT_RATE_LIMIT = _get("CELERY_DEFAULT_RATE_LIMIT")
 DISABLE_RATE_LIMITS = _get("CELERY_DISABLE_RATE_LIMITS")
 DISABLE_RATE_LIMITS = _get("CELERY_DISABLE_RATE_LIMITS")
 STORE_ERRORS_EVEN_IF_IGNORED = _get("CELERY_STORE_ERRORS_EVEN_IF_IGNORED")
 STORE_ERRORS_EVEN_IF_IGNORED = _get("CELERY_STORE_ERRORS_EVEN_IF_IGNORED")
-SEND_CELERY_TASK_ERROR_EMAILS = _get("SEND_CELERY_TASK_ERROR_EMAILS",
-                                     not settings.DEBUG)
-LOG_FORMAT = _get("CELERYD_DAEMON_LOG_FORMAT")
-DAEMON_LOG_FILE = _get("CELERYD_LOG_FILE")
-DAEMON_LOG_LEVEL = _get("CELERYD_DAEMON_LOG_LEVEL")
-DAEMON_LOG_LEVEL = LOG_LEVELS[DAEMON_LOG_LEVEL.upper()]
-DAEMON_PID_FILE = _get("CELERYD_PID_FILE")
-DAEMON_CONCURRENCY = _get("CELERYD_CONCURRENCY")
+CELERY_SEND_TASK_ERROR_EMAILS = _get("CELERY_SEND_TASK_ERROR_EMAILS",
+                                     not settings.DEBUG,
+                                     compat=["SEND_CELERY_TASK_ERROR_EMAILS"])
+CELERYD_LOG_FORMAT = _get("CELERYD_LOG_FORMAT",
+                          compat=["CELERYD_DAEMON_LOG_FORMAT"])
+CELERYD_LOG_FILE = _get("CELERYD_LOG_FILE")
+CELERYD_LOG_LEVEL = _get("CELERYD_LOG_LEVEL",
+                        compat=["CELERYD_DAEMON_LOG_LEVEL"])
+CELERYD_LOG_LEVEL = LOG_LEVELS[CELERYD_LOG_LEVEL.upper()]
+CELERYD_PID_FILE = _get("CELERYD_PID_FILE")
+CELERYD_CONCURRENCY = _get("CELERYD_CONCURRENCY")
 
 
 # <--- Message routing                             <-   --   --- - ----- -- #
 # <--- Message routing                             <-   --   --- - ----- -- #
 QUEUES = _get("CELERY_QUEUES")
 QUEUES = _get("CELERY_QUEUES")
@@ -131,9 +148,12 @@ if not QUEUES:
     QUEUES = _find_deprecated_queue_settings()
     QUEUES = _find_deprecated_queue_settings()
 
 
 # :--- Broker connections                           <-   --   --- - ----- -- #
 # :--- Broker connections                           <-   --   --- - ----- -- #
-AMQP_CONNECTION_TIMEOUT = _get("CELERY_AMQP_CONNECTION_TIMEOUT")
-AMQP_CONNECTION_RETRY = _get("CELERY_AMQP_CONNECTION_RETRY")
-AMQP_CONNECTION_MAX_RETRIES = _get("CELERY_AMQP_CONNECTION_MAX_RETRIES")
+BROKER_CONNECTION_TIMEOUT = _get("CELERY_BROKER_CONNECTION_TIMEOUT",
+                                compat=["CELERY_AMQP_CONNECTION_TIMEOUT"])
+BROKER_CONNECTION_RETRY = _get("CELERY_BROKER_CONNECTION_RETRY",
+                                compat=["CELERY_AMQP_CONNECTION_RETRY"])
+BROKER_CONNECTION_MAX_RETRIES = _get("CELERY_BROKER_CONNECTION_MAX_RETRIES",
+                                compat=["CELERY_AMQP_CONNECTION_MAX_RETRIES"])
 
 
 
 
 # :--- Celery Beat                                  <-   --   --- - ----- -- #
 # :--- Celery Beat                                  <-   --   --- - ----- -- #

+ 2 - 2
celery/log.py

@@ -22,8 +22,8 @@ def get_default_logger(loglevel=None):
 
 
 
 
 _monkeypatched = [False]
 _monkeypatched = [False]
-def setup_logger(loglevel=conf.DAEMON_LOG_LEVEL, logfile=None,
-        format=conf.LOG_FORMAT, **kwargs):
+def setup_logger(loglevel=conf.CELERYD_LOG_LEVEL, logfile=None,
+        format=conf.CELERYD_LOG_FORMAT, **kwargs):
     """Setup the ``multiprocessing`` logger. If ``logfile`` is not specified,
     """Setup the ``multiprocessing`` logger. If ``logfile`` is not specified,
     ``stderr`` is used.
     ``stderr`` is used.
 
 

+ 3 - 3
celery/messaging.py

@@ -124,7 +124,7 @@ class BroadcastConsumer(Consumer):
     no_ack = True
     no_ack = True
 
 
 
 
-def establish_connection(connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+def establish_connection(connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
     return DjangoBrokerConnection(connect_timeout=connect_timeout)
     return DjangoBrokerConnection(connect_timeout=connect_timeout)
 
 
 
 
@@ -134,7 +134,7 @@ def with_connection(fun):
     def _inner(*args, **kwargs):
     def _inner(*args, **kwargs):
         connection = kwargs.get("connection")
         connection = kwargs.get("connection")
         timeout = kwargs.get("connect_timeout",
         timeout = kwargs.get("connect_timeout",
-                                conf.AMQP_CONNECTION_TIMEOUT)
+                                conf.BROKER_CONNECTION_TIMEOUT)
         kwargs["connection"] = conn = connection or \
         kwargs["connection"] = conn = connection or \
                 establish_connection(connect_timeout=timeout)
                 establish_connection(connect_timeout=timeout)
         close_connection = not connection and conn.close or noop
         close_connection = not connection and conn.close or noop
@@ -147,7 +147,7 @@ def with_connection(fun):
 
 
 
 
 def with_connection_inline(fun, connection=None,
 def with_connection_inline(fun, connection=None,
-        connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+        connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
     conn = connection or establish_connection()
     conn = connection or establish_connection()
     close_connection = not connection and conn.close or noop
     close_connection = not connection and conn.close or noop
 
 

+ 4 - 4
celery/task/base.py

@@ -204,12 +204,12 @@ class Task(object):
         return setup_logger(loglevel=loglevel, logfile=logfile)
         return setup_logger(loglevel=loglevel, logfile=logfile)
 
 
     def establish_connection(self,
     def establish_connection(self,
-            connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+            connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
         """Establish a connection to the message broker."""
         """Establish a connection to the message broker."""
         return _establish_connection(connect_timeout)
         return _establish_connection(connect_timeout)
 
 
     def get_publisher(self, connection=None, exchange=None,
     def get_publisher(self, connection=None, exchange=None,
-            connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+            connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
         """Get a celery task message publisher.
         """Get a celery task message publisher.
 
 
         :rtype: :class:`celery.messaging.TaskPublisher`.
         :rtype: :class:`celery.messaging.TaskPublisher`.
@@ -230,7 +230,7 @@ class Task(object):
                              routing_key=self.routing_key)
                              routing_key=self.routing_key)
 
 
     def get_consumer(self, connection=None,
     def get_consumer(self, connection=None,
-            connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+            connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
         """Get a celery task message consumer.
         """Get a celery task message consumer.
 
 
         :rtype: :class:`celery.messaging.TaskConsumer`.
         :rtype: :class:`celery.messaging.TaskConsumer`.
@@ -489,7 +489,7 @@ class TaskSet(object):
             "in celery v1.2.0"))
             "in celery v1.2.0"))
         return self.apply_async(*args, **kwargs)
         return self.apply_async(*args, **kwargs)
 
 
-    def apply_async(self, connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+    def apply_async(self, connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
         """Run all tasks in the taskset.
         """Run all tasks in the taskset.
 
 
         :returns: A :class:`celery.result.TaskSetResult` instance.
         :returns: A :class:`celery.result.TaskSetResult` instance.

+ 5 - 4
celery/task/control.py

@@ -3,7 +3,8 @@ from celery.messaging import TaskConsumer, BroadcastPublisher, with_connection
 
 
 
 
 @with_connection
 @with_connection
-def discard_all(connection=None, connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+def discard_all(connection=None,
+        connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
     """Discard all waiting tasks.
     """Discard all waiting tasks.
 
 
     This will ignore all tasks waiting for execution, and they will
     This will ignore all tasks waiting for execution, and they will
@@ -20,7 +21,7 @@ def discard_all(connection=None, connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
 
 
 
 
 def revoke(task_id, destination=None, connection=None,
 def revoke(task_id, destination=None, connection=None,
-        connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+        connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
     """Revoke a task by id.
     """Revoke a task by id.
 
 
     If a task is revoked, the workers will ignore the task and not execute
     If a task is revoked, the workers will ignore the task and not execute
@@ -40,7 +41,7 @@ def revoke(task_id, destination=None, connection=None,
 
 
 
 
 def rate_limit(task_name, rate_limit, destination=None, connection=None,
 def rate_limit(task_name, rate_limit, destination=None, connection=None,
-        connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+        connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
     """Set rate limit for task by type.
     """Set rate limit for task by type.
 
 
     :param task_name: Type of task to change rate limit for.
     :param task_name: Type of task to change rate limit for.
@@ -61,7 +62,7 @@ def rate_limit(task_name, rate_limit, destination=None, connection=None,
 
 
 @with_connection
 @with_connection
 def broadcast(command, arguments=None, destination=None, connection=None,
 def broadcast(command, arguments=None, destination=None, connection=None,
-        connect_timeout=conf.AMQP_CONNECTION_TIMEOUT):
+        connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
     """Broadcast a control command to the celery workers.
     """Broadcast a control command to the celery workers.
 
 
     :param command: Name of command to send.
     :param command: Name of command to send.

+ 5 - 5
celery/tests/test_conf.py

@@ -8,10 +8,10 @@ SETTING_VARS = (
     ("CELERY_DEFAULT_ROUTING_KEY", "DEFAULT_ROUTING_KEY"),
     ("CELERY_DEFAULT_ROUTING_KEY", "DEFAULT_ROUTING_KEY"),
     ("CELERY_DEFAULT_EXCHANGE_TYPE", "DEFAULT_EXCHANGE_TYPE"),
     ("CELERY_DEFAULT_EXCHANGE_TYPE", "DEFAULT_EXCHANGE_TYPE"),
     ("CELERY_DEFAULT_EXCHANGE", "DEFAULT_EXCHANGE"),
     ("CELERY_DEFAULT_EXCHANGE", "DEFAULT_EXCHANGE"),
-    ("CELERYD_CONCURRENCY", "DAEMON_CONCURRENCY"),
-    ("CELERYD_PID_FILE", "DAEMON_PID_FILE"),
-    ("CELERYD_LOG_FILE", "DAEMON_LOG_FILE"),
-    ("CELERYD_DAEMON_LOG_FORMAT", "LOG_FORMAT"),
+    ("CELERYD_CONCURRENCY", "CELERYD_CONCURRENCY"),
+    ("CELERYD_PID_FILE", "CELERYD_PID_FILE"),
+    ("CELERYD_LOG_FILE", "CELERYD_LOG_FILE"),
+    ("CELERYD_LOG_FORMAT", "CELERYD_LOG_FORMAT"),
 )
 )
 
 
 
 
@@ -32,4 +32,4 @@ class TestConf(unittest.TestCase):
     def test_configuration_cls(self):
     def test_configuration_cls(self):
         for setting_name, result_var in SETTING_VARS:
         for setting_name, result_var in SETTING_VARS:
             self.assertDefaultSetting(setting_name, result_var)
             self.assertDefaultSetting(setting_name, result_var)
-        self.assertTrue(isinstance(conf.DAEMON_LOG_LEVEL, int))
+        self.assertTrue(isinstance(conf.CELERYD_LOG_LEVEL, int))

+ 2 - 2
celery/tests/test_worker_job.py

@@ -282,7 +282,7 @@ class TestTaskWrapper(unittest.TestCase):
         tw.logger = setup_logger(logfile=logfh, loglevel=logging.INFO)
         tw.logger = setup_logger(logfile=logfh, loglevel=logging.INFO)
 
 
         from celery import conf
         from celery import conf
-        conf.SEND_CELERY_TASK_ERROR_EMAILS = True
+        conf.CELERY_SEND_TASK_ERROR_EMAILS = True
 
 
         tw.on_failure(exc_info)
         tw.on_failure(exc_info)
         logvalue = logfh.getvalue()
         logvalue = logfh.getvalue()
@@ -290,4 +290,4 @@ class TestTaskWrapper(unittest.TestCase):
         self.assertTrue(tid in logvalue)
         self.assertTrue(tid in logvalue)
         self.assertTrue("ERROR" in logvalue)
         self.assertTrue("ERROR" in logvalue)
 
 
-        conf.SEND_CELERY_TASK_ERROR_EMAILS = False
+        conf.CELERY_SEND_TASK_ERROR_EMAILS = False

+ 4 - 4
celery/worker/__init__.py

@@ -37,7 +37,7 @@ class WorkController(object):
     .. attribute:: concurrency
     .. attribute:: concurrency
 
 
         The number of simultaneous processes doing work (default:
         The number of simultaneous processes doing work (default:
-        :const:`celery.conf.DAEMON_CONCURRENCY`)
+        :const:`celery.conf.CELERYD_CONCURRENCY`)
 
 
     .. attribute:: loglevel
     .. attribute:: loglevel
 
 
@@ -46,7 +46,7 @@ class WorkController(object):
     .. attribute:: logfile
     .. attribute:: logfile
 
 
         The logfile used, if no logfile is specified it uses ``stderr``
         The logfile used, if no logfile is specified it uses ``stderr``
-        (default: :const:`celery.conf.DAEMON_LOG_FILE`).
+        (default: :const:`celery.conf.CELERYD_LOG_FILE`).
 
 
     .. attribute:: embed_clockservice
     .. attribute:: embed_clockservice
 
 
@@ -95,8 +95,8 @@ class WorkController(object):
 
 
     """
     """
     loglevel = logging.ERROR
     loglevel = logging.ERROR
-    concurrency = conf.DAEMON_CONCURRENCY
-    logfile = conf.DAEMON_LOG_FILE
+    concurrency = conf.CELERYD_CONCURRENCY
+    logfile = conf.CELERYD_LOG_FILE
     _state = None
     _state = None
 
 
     def __init__(self, concurrency=None, logfile=None, loglevel=None,
     def __init__(self, concurrency=None, logfile=None, loglevel=None,

+ 1 - 1
celery/worker/job.py

@@ -334,7 +334,7 @@ class TaskWrapper(object):
         self.logger.error(self.fail_msg.strip() % context)
         self.logger.error(self.fail_msg.strip() % context)
 
 
         task_obj = tasks.get(self.task_name, object)
         task_obj = tasks.get(self.task_name, object)
-        send_error_email = conf.SEND_CELERY_TASK_ERROR_EMAILS and not \
+        send_error_email = conf.CELERY_SEND_TASK_ERROR_EMAILS and not \
                                 task_obj.disable_error_emails
                                 task_obj.disable_error_emails
         if send_error_email:
         if send_error_email:
             subject = self.fail_email_subject.strip() % context
             subject = self.fail_email_subject.strip() % context

+ 2 - 2
celery/worker/listener.py

@@ -199,12 +199,12 @@ class CarrotListener(object):
             connected = conn.connection # Connection is established lazily.
             connected = conn.connection # Connection is established lazily.
             return conn
             return conn
 
 
-        if not conf.AMQP_CONNECTION_RETRY:
+        if not conf.BROKER_CONNECTION_RETRY:
             return _establish_connection()
             return _establish_connection()
 
 
         conn = retry_over_time(_establish_connection, (socket.error, IOError),
         conn = retry_over_time(_establish_connection, (socket.error, IOError),
                                errback=_connection_error_handler,
                                errback=_connection_error_handler,
-                               max_retries=conf.AMQP_CONNECTION_MAX_RETRIES)
+                               max_retries=conf.BROKER_CONNECTION_MAX_RETRIES)
         return conn
         return conn
 
 
     def stop(self):
     def stop(self):

+ 8 - 8
docs/configuration.rst

@@ -37,8 +37,8 @@ it should contain all you need to run a basic celery set-up.
     # CELERYD_CONCURRENCY = 8
     # CELERYD_CONCURRENCY = 8
 
 
     # CELERYD_LOG_FILE = "celeryd.log"
     # CELERYD_LOG_FILE = "celeryd.log"
+    # CELERYD_LOG_LEVEL = "INFO"
     # CELERYD_PID_FILE = "celeryd.pid"
     # CELERYD_PID_FILE = "celeryd.pid"
-    # CELERYD_DAEMON_LOG_LEVEL = "INFO"
 
 
 Concurrency settings
 Concurrency settings
 ====================
 ====================
@@ -299,20 +299,20 @@ Routing
 Connection
 Connection
 ----------
 ----------
 
 
-* CELERY_AMQP_CONNECTION_TIMEOUT
+* CELERY_BROKER_CONNECTION_TIMEOUT
     The timeout in seconds before we give up establishing a connection
     The timeout in seconds before we give up establishing a connection
     to the AMQP server. Default is 4 seconds.
     to the AMQP server. Default is 4 seconds.
 
 
-* CELERY_AMQP_CONNECTION_RETRY
+* CELERY_BROKER_CONNECTION_RETRY
     Automatically try to re-establish the connection to the AMQP broker if
     Automatically try to re-establish the connection to the AMQP broker if
     it's lost.
     it's lost.
 
 
     The time between retries is increased for each retry, and is
     The time between retries is increased for each retry, and is
-    not exhausted before ``CELERY_AMQP_CONNECTION_MAX_RETRIES`` is exceeded.
+    not exhausted before ``CELERY_BROKER_CONNECTION_MAX_RETRIES`` is exceeded.
 
 
     This behaviour is on by default.
     This behaviour is on by default.
 
 
-* CELERY_AMQP_CONNECTION_MAX_RETRIES
+* CELERY_BROKER_CONNECTION_MAX_RETRIES
     Maximum number of retries before we give up re-establishing a connection
     Maximum number of retries before we give up re-establishing a connection
     to the AMQP broker.
     to the AMQP broker.
 
 
@@ -360,7 +360,7 @@ Worker: celeryd
 * CELERY_SEND_EVENTS
 * CELERY_SEND_EVENTS
     Send events so the worker can be monitored by tools like ``celerymon``.
     Send events so the worker can be monitored by tools like ``celerymon``.
 
 
-* SEND_CELERY_TASK_ERROR_EMAILS
+* CELERY_SEND_TASK_ERROR_EMAILS
     If set to ``True``, errors in tasks will be sent to admins by e-mail.
     If set to ``True``, errors in tasks will be sent to admins by e-mail.
     If unset, it will send the e-mails if ``settings.DEBUG`` is False.
     If unset, it will send the e-mails if ``settings.DEBUG`` is False.
 
 
@@ -381,7 +381,7 @@ Logging
 
 
     Can also be set via the ``--logfile`` argument.
     Can also be set via the ``--logfile`` argument.
 
 
-* CELERYD_DAEMON_LOG_LEVEL
+* CELERYD_LOG_LEVEL
     Worker log level, can be any of ``DEBUG``, ``INFO``, ``WARNING``,
     Worker log level, can be any of ``DEBUG``, ``INFO``, ``WARNING``,
     ``ERROR``, ``CRITICAL``.
     ``ERROR``, ``CRITICAL``.
 
 
@@ -389,7 +389,7 @@ Logging
 
 
     See the :mod:`logging` module for more information.
     See the :mod:`logging` module for more information.
 
 
-* CELERYD_DAEMON_LOG_FORMAT
+* CELERYD_LOG_FORMAT
     The format to use for log messages. Can be overridden using
     The format to use for log messages. Can be overridden using
     the ``--loglevel`` option to ``celeryd``.
     the ``--loglevel`` option to ``celeryd``.
 
 

+ 8 - 8
docs/reference/celery.conf.rst

@@ -22,12 +22,12 @@ Configuration - celery.conf
 
 
     Default routing key used when sending tasks.
     Default routing key used when sending tasks.
 
 
-.. data:: AMQP_CONNECTION_TIMEOUT
+.. data:: BROKER_CONNECTION_TIMEOUT
 
 
     The timeout in seconds before we give up establishing a connection
     The timeout in seconds before we give up establishing a connection
     to the AMQP server.
     to the AMQP server.
 
 
-.. data:: SEND_CELERY_TASK_ERROR_EMAILS
+.. data:: CELERY_SEND_TASK_ERROR_EMAILS
 
 
     If set to ``True``, errors in tasks will be sent to admins by e-mail.
     If set to ``True``, errors in tasks will be sent to admins by e-mail.
     If unset, it will send the e-mails if ``settings.DEBUG`` is False.
     If unset, it will send the e-mails if ``settings.DEBUG`` is False.
@@ -40,12 +40,12 @@ Configuration - celery.conf
 
 
     Task tombstone expire time in seconds.
     Task tombstone expire time in seconds.
 
 
-.. data:: AMQP_CONNECTION_RETRY
+.. data:: BROKER_CONNECTION_RETRY
 
 
     Automatically try to re-establish the connection to the AMQP broker if
     Automatically try to re-establish the connection to the AMQP broker if
     it's lost.
     it's lost.
 
 
-.. data:: AMQP_CONNECTION_MAX_RETRIES
+.. data:: BROKER_CONNECTION_MAX_RETRIES
 
 
     Maximum number of retries before we give up re-establishing a connection
     Maximum number of retries before we give up re-establishing a connection
     to the broker.
     to the broker.
@@ -141,19 +141,19 @@ Configuration - celery.conf
 
 
     The format to use for log messages.
     The format to use for log messages.
 
 
-.. data:: DAEMON_LOG_FILE
+.. data:: CELERYD_LOG_FILE
 
 
     Filename of the daemon log file.
     Filename of the daemon log file.
 
 
-.. data:: DAEMON_LOG_LEVEL
+.. data:: CELERYD_LOG_LEVEL
 
 
     Default log level for daemons. (``WARN``)
     Default log level for daemons. (``WARN``)
 
 
-.. data:: DAEMON_PID_FILE
+.. data:: CELERYD_PID_FILE
 
 
     Full path to the daemon pidfile.
     Full path to the daemon pidfile.
 
 
-.. data:: DAEMON_CONCURRENCY
+.. data:: CELERYD_CONCURRENCY
 
 
     The number of concurrent worker processes.
     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 total number of available CPUs/cores will be used.

+ 1 - 1
testproj/settings.py

@@ -73,4 +73,4 @@ else:
     pass
     pass
     INSTALLED_APPS += ("test_extensions", )
     INSTALLED_APPS += ("test_extensions", )
 
 
-SEND_CELERY_TASK_ERROR_EMAILS = False
+CELERY_SEND_TASK_ERROR_EMAILS = False