Browse Source

Cosmetics

Ask Solem 13 years ago
parent
commit
641e838dd6
99 changed files with 442 additions and 400 deletions
  1. 1 0
      celery/__init__.py
  2. 6 5
      celery/app/__init__.py
  3. 5 5
      celery/app/amqp.py
  4. 6 5
      celery/app/base.py
  5. 11 0
      celery/app/defaults.py
  6. 12 1
      celery/app/task/__init__.py
  7. 1 0
      celery/apps/beat.py
  8. 1 0
      celery/apps/worker.py
  9. 1 0
      celery/backends/__init__.py
  10. 1 0
      celery/backends/base.py
  11. 1 0
      celery/backends/cache.py
  12. 1 0
      celery/backends/cassandra.py
  13. 1 0
      celery/backends/database.py
  14. 1 0
      celery/backends/mongodb.py
  15. 1 0
      celery/backends/pyredis.py
  16. 1 0
      celery/backends/redis.py
  17. 1 0
      celery/backends/tyrant.py
  18. 6 6
      celery/beat.py
  19. 1 0
      celery/bin/base.py
  20. 1 1
      celery/bin/camqadm.py
  21. 1 1
      celery/bin/celerybeat.py
  22. 1 0
      celery/bin/celeryctl.py
  23. 1 1
      celery/bin/celeryd.py
  24. 1 0
      celery/bin/celeryd_detach.py
  25. 1 0
      celery/bin/celeryd_multi.py
  26. 1 0
      celery/bin/celeryev.py
  27. 1 0
      celery/concurrency/__init__.py
  28. 1 0
      celery/concurrency/base.py
  29. 1 0
      celery/concurrency/eventlet.py
  30. 1 0
      celery/concurrency/gevent.py
  31. 1 5
      celery/concurrency/processes/__init__.py
  32. 1 2
      celery/concurrency/processes/_win.py
  33. 1 2
      celery/concurrency/processes/pool.py
  34. 1 0
      celery/concurrency/solo.py
  35. 1 0
      celery/concurrency/threads.py
  36. 1 0
      celery/conf.py
  37. 1 0
      celery/contrib/abortable.py
  38. 1 0
      celery/contrib/batches.py
  39. 1 0
      celery/contrib/rdb.py
  40. 7 7
      celery/datastructures.py
  41. 1 0
      celery/db/a805d4bd.py
  42. 1 0
      celery/db/dfd042c7.py
  43. 1 0
      celery/db/models.py
  44. 1 0
      celery/db/session.py
  45. 0 2
      celery/decorators.py
  46. 8 7
      celery/events/__init__.py
  47. 7 5
      celery/events/cursesmon.py
  48. 7 6
      celery/events/dumper.py
  49. 10 9
      celery/events/snapshot.py
  50. 14 14
      celery/events/state.py
  51. 6 14
      celery/exceptions.py
  52. 1 0
      celery/execute/__init__.py
  53. 8 7
      celery/execute/trace.py
  54. 7 6
      celery/loaders/__init__.py
  55. 6 5
      celery/loaders/app.py
  56. 6 6
      celery/loaders/base.py
  57. 6 5
      celery/loaders/default.py
  58. 8 6
      celery/local.py
  59. 1 13
      celery/log.py
  60. 2 8
      celery/messaging.py
  61. 7 9
      celery/platforms.py
  62. 6 5
      celery/registry.py
  63. 7 6
      celery/result.py
  64. 8 6
      celery/routes.py
  65. 8 6
      celery/schedules.py
  66. 1 3
      celery/states.py
  67. 9 12
      celery/task/__init__.py
  68. 6 5
      celery/task/base.py
  69. 6 5
      celery/task/chords.py
  70. 7 8
      celery/task/control.py
  71. 6 6
      celery/task/http.py
  72. 2 3
      celery/task/schedules.py
  73. 6 5
      celery/task/sets.py
  74. 6 12
      celery/utils/__init__.py
  75. 8 4
      celery/utils/compat.py
  76. 2 3
      celery/utils/dispatch/__init__.py
  77. 1 0
      celery/utils/dispatch/saferef.py
  78. 1 0
      celery/utils/dispatch/signal.py
  79. 9 7
      celery/utils/encoding.py
  80. 6 5
      celery/utils/functional.py
  81. 6 6
      celery/utils/mail.py
  82. 6 5
      celery/utils/patch.py
  83. 6 8
      celery/utils/serialization.py
  84. 6 7
      celery/utils/term.py
  85. 13 9
      celery/utils/timer2.py
  86. 6 7
      celery/utils/timeutils.py
  87. 6 5
      celery/worker/__init__.py
  88. 10 9
      celery/worker/autoscale.py
  89. 11 11
      celery/worker/buckets.py
  90. 8 7
      celery/worker/consumer.py
  91. 7 4
      celery/worker/control/__init__.py
  92. 6 11
      celery/worker/control/builtins.py
  93. 7 6
      celery/worker/control/registry.py
  94. 7 6
      celery/worker/heartbeat.py
  95. 7 8
      celery/worker/job.py
  96. 12 12
      celery/worker/mediator.py
  97. 8 11
      celery/worker/state.py
  98. 4 3
      docs/conf.py
  99. 7 1
      docs/reference/celery.signals.rst

+ 1 - 0
celery/__init__.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """Distributed Task Queue"""
 # :copyright: (c) 2009 - 2011 by Ask Solem.
 # :license:   BSD, see LICENSE for more details.

+ 6 - 5
celery/app/__init__.py

@@ -1,11 +1,12 @@
+# -*- coding: utf-8 -*-
 """
-celery.app
-==========
+    celery.app
+    ~~~~~~~~~~
 
-Celery Application.
+    Celery Application.
 
-:copyright: (c) 2009 - 2011 by Ask Solem.
-:license: BSD, see LICENSE for more details.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 

+ 5 - 5
celery/app/amqp.py

@@ -1,12 +1,12 @@
 # -*- coding: utf-8 -*-
 """
-celery.app.amqp
-===============
+    celery.app.amqp
+    ~~~~~~~~~~~~~~~
 
-AMQ related functionality.
+    AMQ related functionality.
 
-:copyright: (c) 2009 - 2011 by Ask Solem.
-:license: BSD, see LICENSE for more details.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import

+ 6 - 5
celery/app/base.py

@@ -1,11 +1,12 @@
+# -*- coding: utf-8 -*-
 """
-celery.app.base
-===============
+    celery.app.base
+    ~~~~~~~~~~~~~~~
 
-Application Base Class.
+    Application Base Class.
 
-:copyright: (c) 2009 - 2011 by Ask Solem.
-:license: BSD, see LICENSE for more details.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import

+ 11 - 0
celery/app/defaults.py

@@ -1,3 +1,14 @@
+# -*- coding: utf-8 -*-
+"""
+    celery.app.defaults
+    ~~~~~~~~~~~~~~~~~~~
+
+    Configuration introspection and defaults.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
+
+"""
 from __future__ import absolute_import
 
 import sys

+ 12 - 1
celery/app/task/__init__.py

@@ -1,4 +1,15 @@
-# -*- coding: utf-8 -*-"
+# -*- coding: utf-8 -*-
+"""
+    celery.app.task
+    ~~~~~~~~~~~~~~~
+
+    Tasks Implementation.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
+
+"""
+
 from __future__ import absolute_import
 
 import sys

+ 1 - 0
celery/apps/beat.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import atexit

+ 1 - 0
celery/apps/worker.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import atexit

+ 1 - 0
celery/backends/__init__.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from .. import current_app

+ 1 - 0
celery/backends/base.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """celery.backends.base"""
 from __future__ import absolute_import
 

+ 1 - 0
celery/backends/cache.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from ..datastructures import LRUCache

+ 1 - 0
celery/backends/cassandra.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """celery.backends.cassandra"""
 from __future__ import absolute_import
 

+ 1 - 0
celery/backends/database.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from datetime import datetime

+ 1 - 0
celery/backends/mongodb.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """MongoDB backend for celery."""
 from __future__ import absolute_import
 

+ 1 - 0
celery/backends/pyredis.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 This is here for backwards compatibility only.
 

+ 1 - 0
celery/backends/redis.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from ..exceptions import ImproperlyConfigured

+ 1 - 0
celery/backends/tyrant.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """celery.backends.tyrant"""
 from __future__ import absolute_import
 

+ 6 - 6
celery/beat.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.beat
+    ~~~~~~~~~~~
 
-celery.beat
-===========
+    The Celery periodic task scheduler.
 
-The Celery periodic task scheduler.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -32,9 +35,6 @@ from .schedules import maybe_schedule, crontab
 from .utils import cached_property, instantiate, maybe_promise
 from .utils.timeutils import humanize_seconds
 
-__all__ = ["SchedulingError", "ScheduleEntry", "Scheduler",
-           "Service", "EmbeddedService"]
-
 
 class SchedulingError(Exception):
     """An error occured while scheduling a task."""

+ 1 - 0
celery/bin/base.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import os

+ 1 - 1
celery/bin/camqadm.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """camqadm
 
 .. program:: camqadm

+ 1 - 1
celery/bin/celerybeat.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """celerybeat
 
 .. program:: celerybeat

+ 1 - 0
celery/bin/celeryctl.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 1 - 1
celery/bin/celeryd.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+# -*- coding: utf-8 -*-
 """celeryd
 
 .. program:: celeryd

+ 1 - 0
celery/bin/celeryd_detach.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 1 - 0
celery/bin/celeryd_multi.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 
 Examples

+ 1 - 0
celery/bin/celeryev.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 from __future__ import with_statement
 

+ 1 - 0
celery/concurrency/__init__.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from ..utils import get_cls_by_name

+ 1 - 0
celery/concurrency/base.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import logging

+ 1 - 0
celery/concurrency/eventlet.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import os

+ 1 - 0
celery/concurrency/gevent.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import os

+ 1 - 5
celery/concurrency/processes/__init__.py

@@ -1,8 +1,4 @@
-"""
-
-Process Pools.
-
-"""
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import platform

+ 1 - 2
celery/concurrency/processes/_win.py

@@ -1,9 +1,8 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import os
 
-__all__ = ["get_processtree_pids", "kill_processtree"]
-
 # psutil is painfully slow in win32. So to avoid adding big
 # dependencies like pywin32 a ctypes based solution is preferred
 

+ 1 - 2
celery/concurrency/processes/pool.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 #
 # Module providing the `Pool` class for managing a process pool
 #
@@ -7,8 +8,6 @@
 #
 from __future__ import absolute_import
 
-__all__ = ['Pool']
-
 #
 # Imports
 #

+ 1 - 0
celery/concurrency/solo.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import os

+ 1 - 0
celery/concurrency/threads.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from UserDict import UserDict

+ 1 - 0
celery/conf.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 
 **DEPRECATED**

+ 1 - 0
celery/contrib/abortable.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 =========================
 Abortable tasks overview

+ 1 - 0
celery/contrib/batches.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 celery.contrib.batches
 ======================

+ 1 - 0
celery/contrib/rdb.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 celery.contrib.rdb
 ==================

+ 7 - 7
celery/datastructures.py

@@ -1,8 +1,12 @@
+# -*- coding: utf-8 -*-
 """
-celery.datastructures
-=====================
+    celery.datastructures
+    ~~~~~~~~~~~~~~~~~~~~~
 
-Custom types and data structures.
+    Custom types and data structures.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -17,10 +21,6 @@ from threading import RLock
 
 from .utils.compat import UserDict, OrderedDict
 
-__all__ = ["AttributeDictMixin", "AttributeDict", "DictAttribute",
-           "ConfigurationView", "ExceptionInfo", "LimitedSet",
-           "LRUCache", "TokenBucket"]
-
 
 class AttributeDictMixin(object):
     """Adds attribute access to mappings.

+ 1 - 0
celery/db/a805d4bd.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 a805d4bd
 This module fixes a bug with pickling and relative imports in Python < 2.6.

+ 1 - 0
celery/db/dfd042c7.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 dfd042c7
 

+ 1 - 0
celery/db/models.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from datetime import datetime

+ 1 - 0
celery/db/session.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from collections import defaultdict

+ 0 - 2
celery/decorators.py

@@ -19,8 +19,6 @@ import warnings
 from . import task as _task
 from .exceptions import CDeprecationWarning
 
-__all__ = ["task", "periodic_task"]
-
 
 warnings.warn(CDeprecationWarning("""
 The `celery.decorators` module and the magic keyword arguments

+ 8 - 7
celery/events/__init__.py

@@ -1,11 +1,14 @@
+# -*- coding: utf-8 -*-
 """
+    celery.events
+    ~~~~~~~~~~~~~
 
-celery.events
-=============
+    Events are messages sent for actions happening
+    in the worker (and clients if :setting:`CELERY_SEND_TASK_SENT_EVENT`
+    is enabled), used for monitoring purposes.
 
-Events are messages sent for actions happening
-in the worker (and clients if :setting:`CELERY_SEND_TASK_SENT_EVENT` is
-enabled).  These events can be used for monitoring.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -25,8 +28,6 @@ from kombu.messaging import Consumer, Producer
 from ..app import app_or_default
 from ..utils import uuid
 
-__all__ = ["event_exchange", "Event", "EventDispatcher", "EventReceiver"]
-
 event_exchange = Exchange("celeryev", type="topic")
 
 

+ 7 - 5
celery/events/cursesmon.py

@@ -1,8 +1,12 @@
+# -*- coding: utf-8 -*-
 """
-celery.events.cursesmon
-=======================
+    celery.events.cursesmon
+    ~~~~~~~~~~~~~~~~~~~~~~~
 
-celeryev is a monitor written in curses using celery events.
+    Graphical monitor of Celery events using curses.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -22,8 +26,6 @@ from .. import states
 from ..app import app_or_default
 from ..utils import abbr, abbrtask
 
-__all__ = ["CursesMonitor", "evtop"]
-
 BORDER_SPACING = 4
 LEFT_BORDER_OFFSET = 3
 UUID_WIDTH = 36

+ 7 - 6
celery/events/dumper.py

@@ -1,10 +1,13 @@
+# -*- coding: utf-8 -*-
 """
+    celery.events.dumper
+    ~~~~~~~~~~~~~~~~~~~~
 
-celery.events.dumper
-====================
+    THis is a simple program that dumps events to the console
+    as they happen.  Think of it like a `tcpdump` for Celery events.
 
-This is a simple program used to show events as they are happening.
-Like tcpdump just for Celery events.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -16,8 +19,6 @@ from datetime import datetime
 from ..app import app_or_default
 from ..datastructures import LRUCache
 
-__all__ = ["Dumper", "evdump"]
-
 
 TASK_NAMES = LRUCache(limit=0xFFF)
 

+ 10 - 9
celery/events/snapshot.py

@@ -1,15 +1,18 @@
+# -*- coding: utf-8 -*-
 """
+    celery.events.snapshot
+    ~~~~~~~~~~~~~~~~~~~~~~
 
-celery.events.snapshot
-======================
+    Consuming the events as a stream is not always suitable
+    so this module implements a system to take snapshots of the
+    state of a cluster at regular intervals.  There is a full
+    implementation of this writing the snapshots to a database
+    in :mod:`djcelery.snapshots` in the `django-celery` distribution.
 
-Consuming the events as a stream is not always suitable,
-so this module implements a system to take snapshots of the
-state of a cluster.  There is a full implementation of this
-writing the snapshots to a database in ``django-celery``.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 
 import atexit
@@ -21,8 +24,6 @@ from ..utils import timer2, instantiate, LOG_LEVELS
 from ..utils.dispatch import Signal
 from ..utils.timeutils import rate
 
-__all__ = ["Polaroid", "evcam"]
-
 
 class Polaroid(object):
     timer = timer2

+ 14 - 14
celery/events/state.py

@@ -1,22 +1,24 @@
+# -*- coding: utf-8 -*-
 """
+    celery.events.state
+    ~~~~~~~~~~~~~~~~~~~
 
-celery.events.state
-===================
+    This module implements a datastructure used to keep
+    track of the state of a cluster of workers and the tasks
+    it is working on (by consuming events).
 
-This module implements a way to keep track of the
-state of a cluster of workers and the tasks it is working on
-by consuming events.
+    For every event consumed the state is updated,
+    so the state represents the state of the cluster
+    at the time of the last event.
 
-For every event consumed the state is updated, so
-it represents the state of the cluster at the time
-of the last event.
+    Snapshots (:mod:`celery.events.snapshot`) can be used to
+    take "pictures" of this state at regular intervals
+    to e.g. store that in a database.
 
-Snapshots (:mod:`celery.events.snapshot`) can be used
-to take pictures of this state at regular intervals
-and e.g. store it inside a database.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 from __future__ import with_statement
 
@@ -29,8 +31,6 @@ from .. import states
 from ..datastructures import AttributeDict, LRUCache
 from ..utils import kwdict
 
-__all__ = ["HEARTBEAT_EXPIRE", "Worker", "Task", "State", "state"]
-
 #: Hartbeat expiry time in seconds.  The worker will be considered offline
 #: if no heartbeat is received within this time.
 #: Default is 2:30 minutes.

+ 6 - 14
celery/exceptions.py

@@ -1,24 +1,16 @@
+# -*- coding: utf-8 -*-
 """
+    celery.exceptions
+    ~~~~~~~~~~~~~~~~~
 
-celery.exceptions
-=================
+    This module contains Celery-specific exceptions.
 
-This module contains Celery-specific exceptions.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 
-__all__ = ["SystemTerminate", "QueueNotFound",
-           "TimeLimitExceeded", "SoftTimeLimitExceeded",
-           "WorkerLostError", "ImproperlyConfigured",
-           "NotRegistered", "AlreadyRegistered",
-           "TimeoutError", "MaxRetriesExceededError",
-           "RetryTaskError", "TaskRevokedError",
-           "NotConfigured", "CPendingDeprecationWarning",
-           "CDeprecationWarning"]
-
-
 UNREGISTERED_FMT = """\
 Task of kind %s is not registered, please make sure it's imported.\
 """

+ 1 - 0
celery/execute/__init__.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 from .. import current_app

+ 8 - 7
celery/execute/trace.py

@@ -1,12 +1,15 @@
+# -*- coding: utf-8 -*-
 """
-celery.execute.trace
-====================
+    celery.execute.trace
+    ~~~~~~~~~~~~~~~~~~~~
 
-This module defines how the task execution is traced,
-errors are recorded, handlers are applied and so on.
+    This module defines how the task execution is traced:
+    errors are recorded, handlers are applied and so on.
 
-"""
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
+"""
 from __future__ import absolute_import
 
 import sys
@@ -17,8 +20,6 @@ from ..datastructures import ExceptionInfo
 from ..exceptions import RetryTaskError
 from ..registry import tasks
 
-__all__ = ["TraceInfo", "TaskTrace"]
-
 
 class TraceInfo(object):
 

+ 7 - 6
celery/loaders/__init__.py

@@ -1,10 +1,13 @@
+# -*- coding: utf-8 -*-
 """
+    celery.loaders
+    ~~~~~~~~~~~~~~
 
-celery.loaders
-==============
+    Loaders define how configuration is read, what happens
+    when workers start, when tasks are executed and so on.
 
-Loaders define how configuration is read, what happens
-when workers start, and when tasks are executed and so on.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -16,8 +19,6 @@ LOADER_ALIASES = {"app": "celery.loaders.app.AppLoader",
                   "default": "celery.loaders.default.Loader",
                   "django": "djcelery.loaders.DjangoLoader"}
 
-__all__ = ["get_loader_cls"]
-
 
 def get_loader_cls(loader):
     """Get loader class by name/alias"""

+ 6 - 5
celery/loaders/app.py

@@ -1,17 +1,18 @@
+# -*- coding: utf-8 -*-
 """
+    celery.loaders.app
+    ~~~~~~~~~~~~~~~~~~
 
-celery.loaders.app
-==================
+    The default loader used with custom app instances.
 
-The default loader used with custom app instances.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
 
 from .base import BaseLoader
 
-__all__ = ["AppLoader"]
-
 
 class AppLoader(BaseLoader):
 

+ 6 - 6
celery/loaders/base.py

@@ -1,12 +1,14 @@
+# -*- coding: utf-8 -*-
 """
+    celery.loaders.base
+    ~~~~~~~~~~~~~~~~~~~
 
-celery.loaders.base
-===================
+    Loader base class.
 
-Loader base class.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 
 import importlib
@@ -22,8 +24,6 @@ from ..utils import (cached_property, get_cls_by_name,
                      import_from_cwd as _import_from_cwd)
 from ..utils.functional import maybe_list
 
-__all__ = ["BaseLoader"]
-
 BUILTIN_MODULES = frozenset(["celery.task"])
 
 ERROR_ENVVAR_NOT_SET = (

+ 6 - 5
celery/loaders/default.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.loaders.default
+    ~~~~~~~~~~~~~~~~~~~~~~
 
-celery.loader.default
-=====================
+    The default loader used when no custom app has been initialized.
 
-The default loader used when no custom app has been initialized.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -19,8 +22,6 @@ from .base import BaseLoader
 
 DEFAULT_CONFIG_MODULE = "celeryconfig"
 
-__all__ = ["Loader"]
-
 
 class Loader(BaseLoader):
     """The loader used by the default app."""

+ 8 - 6
celery/local.py

@@ -1,14 +1,16 @@
+# -*- coding: utf-8 -*-
 """
+    celery.local
+    ~~~~~~~~~~~~
 
-celery.local
-============
+    This module contains critical utilities that
+    needs to be loaded as soon as possible, and that
+    shall not load any third party modules.
 
-This module contains critical utilities that
-needs to be loaded as soon as possible, and that
-should not load any third party modules.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 
 

+ 1 - 13
celery/log.py

@@ -1,11 +1,4 @@
-"""
-
-celery.log
-==========
-
-Logging utilities.
-
-"""
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import logging
@@ -30,11 +23,6 @@ from .utils.term import colored
 
 is_py3k = sys.version_info >= (3, 0)
 
-__all__ = ["ColorFormatter", "Logging", "get_default_logger",
-           "setup_logger", "setup_task_logger", "get_task_logger",
-           "setup_logging_subsystem", "redirect_stdouts_to_logger",
-           "LoggingProxy"]
-
 
 class ColorFormatter(logging.Formatter):
     #: Loglevel -> Color mapping.

+ 2 - 8
celery/messaging.py

@@ -1,11 +1,5 @@
-"""
-
-celery.messaging
-================
-
-This module is deprecated, use ``current_app.amqp`` instead.
-
-"""
+# -*- coding: utf-8 -*-
+"""This module is deprecated, use ``current_app.amqp`` instead."""
 from __future__ import absolute_import
 
 from . import current_app

+ 7 - 9
celery/platforms.py

@@ -1,10 +1,13 @@
+# -*- coding: utf-8 -*-
 """
+    celery.platforms
+    ~~~~~~~~~~~~~~~~
 
-celery.platforms
-================
+    Utilities dealing with platform specifics: signals, daemonization,
+    users, groups, and so on.
 
-Utilities dealing with platform specifics: signals, daemonization, users &
-groups, etc.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -31,11 +34,6 @@ DAEMON_UMASK = 0
 DAEMON_WORKDIR = "/"
 DAEMON_REDIRECT_TO = getattr(os, "devnull", "/dev/null")
 
-__all__ = ["LockFailed", "get_fdmax", "create_pidlock",
-           "DaemonContext", "detached", "parse_uid", "parse_gid",
-           "setegid", "seteuid", "set_effective_user", "Signals",
-           "set_process_title", "set_mp_process_title", "pyimplementation"]
-
 
 def pyimplementation():
     if hasattr(_platform, "python_implementation"):

+ 6 - 5
celery/registry.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.registry
+    ~~~~~~~~~~~~~~~
 
-celery.registry
-===============
+    Registry of available tasks.
 
-Registry of available tasks.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -12,8 +15,6 @@ import inspect
 
 from .exceptions import NotRegistered
 
-__all__ = ["TaskRegistry", "tasks"]
-
 
 class TaskRegistry(dict):
 

+ 7 - 6
celery/result.py

@@ -1,8 +1,12 @@
+# -*- coding: utf-8 -*-
 """
-celery.result
-=============
+    celery.result
+    ~~~~~~~~~~~~~
 
-Task results/state, and result groups.
+    Task results/state and groups of results.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -20,9 +24,6 @@ from .exceptions import TimeoutError
 from .registry import _unpickle_task
 from .utils.compat import OrderedDict
 
-__all__ = ["BaseAsyncResult", "AsyncResult", "ResultSet",
-           "TaskSetResult", "EagerResult"]
-
 
 def _unpickle_result(task_id, task_name):
     return _unpickle_task(task_name).AsyncResult(task_id)

+ 8 - 6
celery/routes.py

@@ -1,9 +1,13 @@
+# -*- coding: utf-8 -*-
 """
-celery.routes
-=============
+    celery.routes
+    ~~~~~~~~~~~~~
 
-Contains utilities for working with task routes (e.g.
-:setting:`CELERY_ROUTES`).
+    Contains utilities for working with task routes
+    (:setting:`CELERY_ROUTES`).
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -11,8 +15,6 @@ from __future__ import absolute_import
 from .exceptions import QueueNotFound
 from .utils import firstmethod, instantiate, lpmerge, mpromise
 
-_all__ = ["MapRoute", "Router", "prepare"]
-
 _first_route = firstmethod("route_for_task")
 
 

+ 8 - 6
celery/schedules.py

@@ -1,11 +1,15 @@
+# -*- coding: utf-8 -*-
 """
-celery.schedules
-================
+    celery.schedules
+    ~~~~~~~~~~~~~~~~
 
-Schedules define when periodic tasks should be run.
+    Schedules define the intervals at which periodic tasks
+    should run.
 
-"""
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
+"""
 from __future__ import absolute_import
 
 import re
@@ -17,8 +21,6 @@ from .utils import is_iterable
 from .utils.timeutils import (timedelta_seconds, weekday,
                               remaining, humanize_seconds)
 
-__all__ = ["ParseException", "schedule", "crontab", "maybe_schedule"]
-
 
 class ParseException(Exception):
     """Raised by crontab_parser when the input can't be parsed."""

+ 1 - 3
celery/states.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 celery.states
 =============
@@ -11,7 +12,6 @@ States
 
 See :ref:`task-states`.
 
-
 Sets
 ----
 
@@ -57,8 +57,6 @@ Misc.
 """
 from __future__ import absolute_import
 
-__all__ = ["precedence", "state"]
-
 #: State precedence.
 #: None represents the precedence of an unknown state.
 #: Lower index means higher precedence.

+ 9 - 12
celery/task/__init__.py

@@ -1,10 +1,12 @@
 # -*- coding: utf-8 -*-
 """
+    celery.task
+    ~~~~~~~~~~~
 
-celery.task
-===========
+    Creating tasks, subtasks, sets and chords.
 
-Creating tasks and subtasks
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -14,15 +16,10 @@ import warnings
 from ..app import app_or_default
 from ..exceptions import CDeprecationWarning
 
-from .base import Task, PeriodicTask
-from .sets import TaskSet, subtask
-from .chords import chord
-from .control import discard_all
-
-__all__ = ["Task", "TaskSet", "PeriodicTask", "subtask",
-           "discard_all", "chord", "group"]
-
-group = TaskSet
+from .base import Task, PeriodicTask  # noqa
+from .sets import TaskSet, subtask    # noqa
+from .chords import chord             # noqa
+from .control import discard_all      # noqa
 
 
 def task(*args, **kwargs):

+ 6 - 5
celery/task/base.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.task.base
+    ~~~~~~~~~~~~~~~~
 
-celery.task.base
-================
+    The task implementation has been moved to :mod:`celery.app.task`.
 
-The task implementation has been moved to :class:`celery.app.task`.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -13,8 +16,6 @@ from ..app.task import Context, TaskType, BaseTask  # noqa
 from ..schedules import maybe_schedule
 from ..utils import deprecated, timeutils
 
-__all__ = ["Task", "PeriodicTask"]
-
 Task = current_app.Task
 
 

+ 6 - 5
celery/task/chords.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.task.chords
+    ~~~~~~~~~~~~~~~~~~
 
-celery.task.chords
-==================
+    Chords (task set callbacks).
 
-Task chords (task set callbacks).
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -14,8 +17,6 @@ from ..utils import uuid
 
 from .sets import TaskSet, subtask
 
-__all__ = ["Chord", "chord"]
-
 
 @current_app.task(name="celery.chord_unlock", max_retries=None)
 def _unlock_chord(setid, callback, interval=1, propagate=False,

+ 7 - 8
celery/task/control.py

@@ -1,10 +1,13 @@
+# -*- coding: utf-8 -*-
 """
+    celery.task.control
+    ~~~~~~~~~~~~~~~~~~~
 
-celery.task.control
-===================
+    Client for worker remote control commands.
+    Server implementation is in :mod:`celery.worker.control`.
 
-The worker remote control command client.
-For the server implementation see :mod:`celery.worker.control`.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -14,10 +17,6 @@ from kombu.pidbox import Mailbox
 
 from ..app import app_or_default
 
-__all__ = ["flatten_reply", "Inspect", "Control",
-           "broadcast", "rate_limit", "time_limit", "ping", "revoke",
-           "discard_all", "inspect"]
-
 
 def flatten_reply(reply):
     nodes = {}

+ 6 - 6
celery/task/http.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.task.http
+    ~~~~~~~~~~~~~~~~
 
-celery.task.http
-================
+    Task webhooks implementation.
 
-Webhook tasks.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -25,9 +28,6 @@ from .base import Task as BaseTask
 
 GET_METHODS = frozenset(["GET", "HEAD"])
 
-__all__ = ["InvalidResponseError", "RemoteExecuteError", "UnknownStatusError",
-           "MutableURL", "HttpDispatch", "HttpDispatchTask", "URL"]
-
 
 class InvalidResponseError(Exception):
     """The remote server gave an invalid response."""

+ 2 - 3
celery/task/schedules.py

@@ -1,10 +1,9 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
 import warnings
-from ..schedules import schedule, crontab_parser, crontab
+from ..schedules import schedule, crontab_parser, crontab  # noqa
 from ..exceptions import CDeprecationWarning
 
-__all__ = ["schedule", "crontab_parser", "crontab"]
-
 warnings.warn(CDeprecationWarning(
     "celery.task.schedules is deprecated and renamed to celery.schedules"))

+ 6 - 5
celery/task/sets.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.task.sets
+    ~~~~~~~~~~~~~~~~
 
-celery.task.sets
-================
+    Creating and applying groups of tasks.
 
-Creating and applying task groups.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -18,8 +21,6 @@ from ..exceptions import CDeprecationWarning
 from ..utils import cached_property, reprcall, uuid
 from ..utils.compat import UserList
 
-__all__ = ["subtask", "TaskSet"]
-
 TASKSET_DEPRECATION_TEXT = """\
 Using this invocation of TaskSet is deprecated and will be removed
 in Celery v2.4!

+ 6 - 12
celery/utils/__init__.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils
+    ~~~~~~~~~~~~
 
-celery.utils
-============
+    Utility functions.
 
-Utility functions that has not found a home in a generic module.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -48,15 +51,6 @@ DEPRECATION_FMT = """
     version %(removal)s. %(alternative)s
 """
 
-__all__ = ["uuid", "warn_deprecated", "deprecated", "lpmerge",
-           "promise", "mpromise", "maybe_promise", "noop",
-           "kwdict", "first", "firstmethod", "chunks",
-           "padlist", "is_iterable", "mattrgetter", "get_full_cls_name",
-           "fun_takes_kwargs", "get_cls_by_name", "instantiate",
-           "truncate_text", "abbr", "abbrtask", "isatty",
-           "textindent", "cwd_in_path", "find_module", "import_from_cwd",
-           "cry", "reprkwargs", "reprcall"]
-
 
 def warn_deprecated(description=None, deprecation=None, removal=None,
         alternative=None):

+ 8 - 4
celery/utils/compat.py

@@ -1,9 +1,13 @@
+# -*- coding: utf-8 -*-
 """
-celery.utils.compat
-===================
+    celery.utils.compat
+    ~~~~~~~~~~~~~~~~~~~
 
-Backward compatible implementations of features
-only available in later Python versions.
+    Backward compatible implementations of features
+    only available in newer Python versions.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import

+ 2 - 3
celery/utils/dispatch/__init__.py

@@ -1,5 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
-from .signal import Signal
-
-__all__ = ["Signal"]
+from .signal import Signal  # noqa

+ 1 - 0
celery/utils/dispatch/saferef.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """
 "Safe weakrefs", originally from pyDispatcher.
 

+ 1 - 0
celery/utils/dispatch/signal.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """Signal class."""
 from __future__ import absolute_import
 

+ 9 - 7
celery/utils/encoding.py

@@ -1,10 +1,14 @@
+# -*- coding: utf-8 -*-
 """
-celery.utils.encoding
-=====================
+    celery.utils.encoding
+    ~~~~~~~~~~~~~~~~~~~~~
 
-Utilities to encode text, and to safely emit text from running
-applications without crashing with the infamous :exc:`UnicodeDecodeError`
-exception.
+    Utilities to encode text, and to safely emit text from running
+    applications without crashing with the infamous :exc:`UnicodeDecodeError`
+    exception.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -12,8 +16,6 @@ from __future__ import absolute_import
 import sys
 import traceback
 
-__all__ = ["str_to_bytes", "bytes_to_str", "from_utf8",
-           "default_encoding", "safe_str", "safe_repr", "bytes_t"]
 is_py3k = sys.version_info >= (3, 0)
 
 

+ 6 - 5
celery/utils/functional.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils.functional
+    ~~~~~~~~~~~~~~~~~~~~~~~
 
-celery.utils.functional
-=======================
+    Utilities for functions.
 
-Functional utilities.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -20,8 +23,6 @@ except ImportError:
 
 from celery.datastructures import LRUCache
 
-__all__ = ["maybe_list", "memoize"]
-
 KEYWORD_MARK = object()
 
 

+ 6 - 6
celery/utils/mail.py

@@ -1,12 +1,14 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils.mail
+    ~~~~~~~~~~~~~~~~~
 
-celery.utils.mail
-=================
+    How task error emails are formatted and sent.
 
-How task error emails are formatted and sent.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 
 import sys
@@ -21,8 +23,6 @@ from celery.utils import get_symbol_by_name
 
 supports_timeout = sys.version_info >= (2, 6)
 
-__all__ = ["SendmailWarning", "Message", "Mailer", "ErrorMail"]
-
 
 class SendmailWarning(UserWarning):
     """Problem happened while sending the email message."""

+ 6 - 5
celery/utils/patch.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils.patch
+    ~~~~~~~~~~~~~~~~~~
 
-celery.utils.path
-=================
+    Monkey-patch to ensure loggers are process aware.
 
-Monkey patch to ensure process aware loggers.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -12,8 +15,6 @@ import logging
 
 _process_aware = False
 
-__all__ = ["ensure_process_aware_logger"]
-
 
 def _patch_logger_class():
     """Make sure process name is recorded when loggers are used."""

+ 6 - 8
celery/utils/serialization.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils.serialization
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-celery.utils.serialization
-==========================
+    Utilities for safely pickling exceptions.
 
-Serialization utilities for safely pickling exceptions.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -41,11 +44,6 @@ else:
 #: List of base classes we probably don't want to reduce to.
 unwanted_base_classes = (StandardError, Exception, BaseException, object)
 
-__all__ = ["subclass_exception", "find_nearest_pickleable_exception",
-           "create_exception_cls", "UnpickleableExceptionWrapper",
-           "get_pickleable_exception", "get_pickled_exception"]
-
-
 if sys.version_info < (2, 5):  # pragma: no cover
 
     # Prior to Python 2.5, Exception was an old-style class

+ 6 - 7
celery/utils/term.py

@@ -1,11 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils.term
+    ~~~~~~~~~~~~~~~~~
 
-celery.utils.term
-=================
-
-Utilties for terminals and terminal colors.
-
+    Terminals and colors.
 
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -14,8 +15,6 @@ import platform
 
 from .encoding import safe_str
 
-__all__ = ["colored"]
-
 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
 OP_SEQ = "\033[%dm"
 RESET_SEQ = "\033[0m"

+ 13 - 9
celery/utils/timer2.py

@@ -1,4 +1,14 @@
-"""timer2 - Scheduler for Python functions."""
+# -*- coding: utf-8 -*-
+"""
+    timer2
+    ~~~~~~
+
+    Scheduler for Python functions.
+
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
+
+"""
 from __future__ import absolute_import
 from __future__ import with_statement
 
@@ -16,21 +26,15 @@ from time import time, sleep, mktime
 
 from datetime import datetime, timedelta
 
-VERSION = (0, 1, 0)
+VERSION = (1, 0, 0)
 __version__ = ".".join(map(str, VERSION))
 __author__ = "Ask Solem"
 __contact__ = "ask@celeryproject.org"
-__homepage__ = "http://github.com/ask/timer/"
+__homepage__ = "http://github.com/ask/timer2/"
 __docformat__ = "restructuredtext"
 
 DEFAULT_MAX_INTERVAL = 2
 
-__all__ = ["TimedFunctionFailed", "to_timestamp",
-           "Entry", "Schedule", "Timer",
-           "default_timer", "apply_after", "apply_at",
-           "apply_interval", "enter_after", "enter",
-           "exit_after", "cancel", "clear"]
-
 
 class TimedFunctionFailed(UserWarning):
     pass

+ 6 - 7
celery/utils/timeutils.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.utils.timeutils
+    ~~~~~~~~~~~~~~~~~~~~~~
 
-celery.utils.timeutils
-======================
+    This module contains various utilities relating to dates and times.
 
-This module contains various utilties relating to time and date.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -13,10 +16,6 @@ import math
 from datetime import datetime, timedelta
 from dateutil.parser import parse as parse_iso8601
 
-__all__ = ["maybe_timedelta", "timedelta_seconds", "delta_resolution",
-           "remaining", "rate", "weekday", "humanize_seconds",
-           "maybe_iso8601"]
-
 DAYNAMES = "sun", "mon", "tue", "wed", "thu", "fri", "sat"
 WEEKDAYS = dict((name, dow) for name, dow in zip(DAYNAMES, range(7)))
 

+ 6 - 5
celery/worker/__init__.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker
+    ~~~~~~~~~~~~~
 
-celery.worker
-=============
+    The worker.
 
-This is the Celery worker process.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -28,8 +31,6 @@ from ..utils import noop, instantiate
 from . import state
 from .buckets import TaskBucket, FastQueue
 
-__all__ = ["WorkController"]
-
 RUN = 0x1
 CLOSE = 0x2
 TERMINATE = 0x3

+ 10 - 9
celery/worker/autoscale.py

@@ -1,14 +1,17 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.autoscale
+    ~~~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.autoscale
-=======================
+    This module implements the internal thread responsible
+    for growing and shrinking the pool according to the
+    current autoscale settings.
 
-This module implements the internal thread responsible
-for growing and shrinking the pool according to the
-current autoscale settings.
+    The autoscale thread is only enabled if autoscale
+    has been enabled on the command line.
 
-The autoscale thread is only enabled if autoscale
-has been enabled on the command line.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -23,8 +26,6 @@ from time import sleep, time
 
 from . import state
 
-__all__ = ["Autoscaler"]
-
 
 class Autoscaler(threading.Thread):
 

+ 11 - 11
celery/worker/buckets.py

@@ -1,15 +1,18 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.buckets
+    ~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.buckets
-=====================
+    This module implements the rate limiting of tasks,
+    by having a token bucket queue for each task type.
+    When a task is allowed to be processed it's moved
+    over the the ``ready_queue``
 
-This module implements the rate limiting of tasks,
-by having a token bucket queue for each task type.
-When a task is allowed to be processed it's moved
-over the the ``ready_queue``
+    The :mod:`celery.worker.mediator` is then responsible
+    for moving tasks from the ``ready_queue`` to the worker pool.
 
-The :mod:`celery.worker.mediator` is then responsible
-for moving tasks from the ready_queue to the worker pool.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -25,9 +28,6 @@ from ..datastructures import TokenBucket
 from ..utils import timeutils
 from ..utils.compat import zip_longest, chain_from_iterable
 
-__all__ = ["RateLimitExceeded", "TaskBucket",
-           "FastQueue", "TokenBucketQueue"]
-
 
 class RateLimitExceeded(Exception):
     """The token buckets rate limit has been exceeded."""

+ 8 - 7
celery/worker/consumer.py

@@ -1,11 +1,14 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.consumer
+    ~~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.consumer
-======================
+    This module contains the component responsible for consuming messages
+    from the broker, processing the messages and keeping the broker connections
+    up and running.
 
-This module contains the component responsible for consuming messages
-from the broker, processing the messages and keeping the broker connections
-up and running.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 
 * :meth:`~Consumer.start` is an infinite loop, which only iterates
@@ -90,8 +93,6 @@ from .job import TaskRequest, InvalidTaskError
 from .control.registry import Panel
 from .heartbeat import Heart
 
-__all__ = ["QoS", "Consumer"]
-
 RUN = 0x1
 CLOSE = 0x2
 

+ 7 - 4
celery/worker/control/__init__.py

@@ -1,10 +1,13 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.control
+    ~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.control
-=====================
+    Remote control commands.
+    See :mod:`celery.worker.control.builtins`.
 
-Remote control commands.
-See :mod:`celery.worker.control.builtins`.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import

+ 6 - 11
celery/worker/control/builtins.py

@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.control.builtins
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.control.builtins
-==============================
+    THis module contains the built-in remote control commands.
 
-This module contains the built-in remote control commands.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -21,14 +24,6 @@ from ..state import revoked
 
 from .registry import Panel
 
-__all__ = ["revoke", "enable_events", "disable_events",
-           "heartbeat", "rate_limit", "time_limit", "stats",
-           "dump_schedule", "dump_reserved", "dump_active",
-           "dump_revoked", "dump_tasks", "ping",
-           "pool_grow", "pool_shrink", "autoscale",
-           "shutdown", "add_consumer", "cancel_consumer",
-           "active_queues"]
-
 TASK_INFO_FIELDS = ("exchange", "routing_key", "rate_limit")
 
 

+ 7 - 6
celery/worker/control/registry.py

@@ -1,18 +1,19 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.control.registry
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.control.registry
-==============================
+    The registry keeps track of available remote control commands,
+    and can be used to register new commands.
 
-The registry keeps track of available remote control commands,
-and can be used to register new commands.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
 
 from ...utils.compat import UserDict
 
-__all__ = ["Panel"]
-
 
 class Panel(UserDict):
     data = dict()                               # Global registry.

+ 7 - 6
celery/worker/heartbeat.py

@@ -1,18 +1,19 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.heartbeat
+    ~~~~~~~~~~~~~~~~~~~~~~~
 
-celery.worker.heartbeat
-=======================
+    This is the internal thread that sends heartbeat events
+    at regular intervals.
 
-This is an internal thread that sends heartbeat events
-at recurring intervals.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
 
 from .state import SOFTWARE_INFO
 
-__all__ = ["Heart"]
-
 
 class Heart(object):
     """Timer sending heartbeats at regular intervals.

+ 7 - 8
celery/worker/job.py

@@ -1,11 +1,13 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.job
+    ~~~~~~~~~~~~~~~~~
 
-celery.worker.job
-=================
+    This module defines the :class:`TaskRequest` class,
+    which specifies how tasks are executed.
 
-This module defines the :class:`TaskRequest` class,
-which specifies how tasks are executed and task state is
-published.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -32,9 +34,6 @@ from ..utils.timeutils import maybe_iso8601
 
 from . import state
 
-__all__ = ["InvalidTaskError", "WorkerTaskTrace",
-           "execute_and_trace", "TaskRequest"]
-
 #: Keys to keep from the message delivery info.  The values
 #: of these keys must be pickleable.
 WANTED_DELIVERY_INFO = ("exchange", "routing_key", "consumer_tag", )

+ 12 - 12
celery/worker/mediator.py

@@ -1,16 +1,19 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.mediator
+    ~~~~~~~~~~~~~~~~~~~~~~
 
-celery.mediator
-===============
+    The mediator is an internal thread that moves tasks
+    from an internal :class:`Queue` to the worker pool.
 
-The mediator is an internal thread that moves tasks
-from an internal :class:`Queue` to the worker pool.
+    This is only used if rate limits are enabled, as it moves
+    messages from the rate limited queue (which holds tasks
+    that are allowed to be processed) to the pool. Disabling
+    rate limits will also disable this machinery,
+    and can improve performance.
 
-This is only used if rate limits are enabled, as it moves
-messages from the rate limited queue (which holds tasks
-that are allowed to be processed) to the pool. Disabling
-rate limits will also disable this machinery,
-and can improve performance.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
 from __future__ import absolute_import
@@ -24,11 +27,8 @@ from Queue import Empty
 
 from ..app import app_or_default
 
-__all__ = ["Mediator"]
-
 
 class Mediator(threading.Thread):
-    """Thread continuously moving tasks from the ready queue onto the pool."""
 
     #: The task queue, a :class:`~Queue.Queue` instance.
     ready_queue = None

+ 8 - 11
celery/worker/state.py

@@ -1,15 +1,17 @@
+# -*- coding: utf-8 -*-
 """
+    celery.worker.state
+    ~~~~~~~~~~~~~~~~~~~
 
-celery.worker.state
-===================
+    Internal worker state (global)
 
-Internal worker state (global)
+    This includes the currently active and reserved tasks,
+    statistics, and revoked tasks.
 
-This includes the currently active and reserved tasks, statistics,
-and revoked tasks.
+    :copyright: (c) 2009 - 2011 by Ask Solem.
+    :license: BSD, see LICENSE for more details.
 
 """
-
 from __future__ import absolute_import
 
 import os
@@ -22,11 +24,6 @@ from .. import __version__
 from ..datastructures import LimitedSet
 from ..utils import cached_property
 
-__all__ = ["SOFTWARE_INFO", "REVOKES_MAX", "REVOKE_EXPIRES",
-           "reserved_requests", "active_requests", "total_count", "revoked",
-           "task_reserved", "task_accepted", "task_ready",
-           "Persistent"]
-
 #: Worker software/platform information.
 SOFTWARE_INFO = {"sw_ident": "celeryd",
                  "sw_ver": __version__,

+ 4 - 3
docs/conf.py

@@ -103,6 +103,7 @@ html_sidebars = {
 
 ### Issuetracker
 
-issuetracker = "github"
-issuetracker_project = "ask/celery"
-issuetracker_issue_pattern = r'[Ii]ssue #(\d+)'
+if not os.environ.get("SKIP_ISSUES"):
+    issuetracker = "github"
+    issuetracker_project = "ask/celery"
+    issuetracker_issue_pattern = r'[Ii]ssue #(\d+)'

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

@@ -1,5 +1,11 @@
-.. _signals:
+======================================================
+ celery.signals
+======================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.signals
 
 .. automodule:: celery.signals
+    :members:
+    :undoc-members: