This document describes Celery 3.0. For development docs,
go here.
celery.datastructures
Custom types and data structures.
-
class celery.datastructures.AttributeDict[source]
Dict subclass with attribute access.
-
class celery.datastructures.AttributeDictMixin[source]
Adds attribute access to mappings.
d.key -> d[key]
-
class celery.datastructures.DictAttribute(obj)[source]
Dict interface to attributes.
obj[k] -> obj.k
-
get(key, default=None)[source]
-
items()[source]
-
iteritems()
-
iterkeys()
-
keys()[source]
-
obj = None
-
setdefault(key, default)[source]
-
class celery.datastructures.ConfigurationView(changes, defaults)[source]
A view over an applications configuration dicts.
If the key does not exist in changes, the defaults dicts
are consulted.
| Parameters: |
- changes – Dict containing changes to the configuration.
- defaults – List of dicts containing the default configuration.
|
-
add_defaults(d)[source]
-
changes = None
-
defaults = None
-
first(*keys)[source]
-
get(key, default=None)[source]
-
items()[source]
-
iteritems()
-
iterkeys()
-
itervalues()
-
keys()[source]
-
setdefault(key, default)[source]
-
update(*args, **kwargs)[source]
-
values()[source]
-
class celery.datastructures.ExceptionInfo(exc_info=None, internal=False)
Exception wrapping an exception and its traceback.
| Parameters: | exc_info – The exception info tuple as returned by
sys.exc_info(). |
-
exception = None
Exception instance.
-
internal = False
Set to true if this is an internal error.
-
tb = None
Pickleable traceback instance for use with traceback
-
traceback = None
String representation of the traceback.
-
type = None
Exception type.
-
class celery.datastructures.LimitedSet(maxlen=None, expires=None, data=None, heap=None)[source]
Kind-of Set with limitations.
Good for when you need to test for membership (a in set),
but the list might become to big, so you want to limit it so it doesn’t
consume too much resources.
| Parameters: |
- maxlen – Maximum number of members before we start
evicting expired members.
- expires – Time in seconds, before a membership expires.
|
-
add(value)[source]
Add a new member.
-
as_dict()[source]
-
chronologically[source]
-
clear()[source]
Remove all members
-
expires
-
first[source]
Get the oldest member.
-
maxlen
-
pop_value(value)[source]
Remove membership by finding value.
-
purge(limit=None)[source]
-
update(other, heappush=<built-in function heappush>)[source]
-
class celery.datastructures.LRUCache(limit=None)
LRU Cache implementation using a doubly linked list to track access.
| Parameters: | limit – The maximum number of keys to keep in the cache.
When a new key is inserted and the limit has been exceeded,
the Least Recently Used key will be discarded from the
cache. |
-
incr(key, delta=1)
-
items()
-
iteritems()
-
itervalues()
-
keys()
-
update(*args, **kwargs)
-
values()