Ver Fonte

PEP8ify

Ask Solem há 15 anos atrás
pai
commit
529dd7146b

+ 1 - 1
FAQ

@@ -11,7 +11,7 @@ What kinds of things should I use celery for?
 **Answer:** `Queue everything and delight everyone`_ is a good article
 describing why you would use a queue in a web context.
 
-.. `Queue everything and delight everyone`:
+.. _`Queue everything and delight everyone`:
     http://decafbad.com/blog/2008/07/04/queue-everything-and-delight-everyone
 
 These are some common use cases:

+ 0 - 33
celery/backends/base.py

@@ -10,39 +10,6 @@ from celery.exceptions import TimeoutError
 from celery import states
 
 
-class Cache(object):
-
-    def __init__(self, expire=None):
-        self.expire = expire
-        self.timestamps = {}
-        self.data = {}
-
-    def __getitem__(self, key):
-        timestamp = self.timestamps[key]
-        if self.expire and timestamp + time.time() > self.expire:
-            self.data.pop(key, None)
-        else:
-            return self.data[key]
-        raise KeyError(key)
-
-    def __setitem__(self, key, value):
-        self.timestamps[key] = time.time()
-        self.data[key] = value
-
-    def __contains__(self, key):
-        if key not in self.data:
-            return False
-        try:
-            self[key]
-        except KeyError:
-            return False
-        else:
-            return True
-
-
-
-
-
 class BaseBackend(object):
     """The base backend class. All backends should inherit from this."""
 

+ 2 - 1
celery/loaders/djangoapp.py

@@ -22,7 +22,8 @@ class Loader(BaseLoader):
 
         """
 
-        # See http://groups.google.com/group/django-users/browse_thread/thread/78200863d0c07c6d/
+        # See http://groups.google.com/group/django-users/
+        #            browse_thread/thread/78200863d0c07c6d/
         from django.db import connection
         connection.close()
 

+ 0 - 1
celery/tests/test_bin_celeryd.py

@@ -11,4 +11,3 @@ class TestWorker(unittest.TestCase):
         w.init_loader()
         self.assertTrue(w.loader)
         self.assertTrue(w.settings)
-

+ 1 - 1
docs/configuration.rst

@@ -83,7 +83,7 @@ Task result backend settings
     * amqp
         Send results back as AMQP messages
         (**WARNING** While very fast, you must make sure you only
-        receive the result once. See :doc:`user-guide/executing`).
+        receive the result once. See :doc:`userguide/executing`).
 
 
 .. _`memcached`: http://memcached.org