|
@@ -200,25 +200,25 @@ class Worker(object):
|
|
|
def id(self):
|
|
|
return '{0.hostname}.{0.pid}'.format(self)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def update_heartbeat(self, received, timestamp):
|
|
|
self.event(None, timestamp, received)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_online(self, timestamp=None, local_received=None, **fields):
|
|
|
self.event('online', timestamp, local_received, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_offline(self, timestamp=None, local_received=None, **fields):
|
|
|
self.event('offline', timestamp, local_received, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_heartbeat(self, timestamp=None, local_received=None, **fields):
|
|
|
self.event('heartbeat', timestamp, local_received, fields)
|
|
|
|
|
|
@class_property
|
|
|
def _defaults(cls):
|
|
|
- """Deprecated, to be removed in 3.3"""
|
|
|
+ """Deprecated, to be removed in 5.0"""
|
|
|
source = cls()
|
|
|
return {k: getattr(source, k) for k in cls._fields}
|
|
|
|
|
@@ -336,44 +336,44 @@ class Task(object):
|
|
|
def ready(self):
|
|
|
return self.state in states.READY_STATES
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_sent(self, timestamp=None, **fields):
|
|
|
self.event('sent', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_received(self, timestamp=None, **fields):
|
|
|
self.event('received', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_started(self, timestamp=None, **fields):
|
|
|
self.event('started', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_failed(self, timestamp=None, **fields):
|
|
|
self.event('failed', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_retried(self, timestamp=None, **fields):
|
|
|
self.event('retried', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_succeeded(self, timestamp=None, **fields):
|
|
|
self.event('succeeded', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_revoked(self, timestamp=None, **fields):
|
|
|
self.event('revoked', timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def on_unknown_event(self, shortype, timestamp=None, **fields):
|
|
|
self.event(shortype, timestamp, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def update(self, state, timestamp, fields,
|
|
|
_state=states.state, RETRY=states.RETRY):
|
|
|
return self.event(state, timestamp, None, fields)
|
|
|
|
|
|
- @deprecated(3.2, 3.3)
|
|
|
+ @deprecated(4.0, 5.0)
|
|
|
def merge(self, state, timestamp, fields):
|
|
|
keep = self.merge_rules.get(state)
|
|
|
if keep is not None:
|
|
@@ -383,7 +383,7 @@ class Task(object):
|
|
|
|
|
|
@class_property
|
|
|
def _defaults(cls):
|
|
|
- """Deprecated, to be removed in 3.3."""
|
|
|
+ """Deprecated, to be removed in 5.0."""
|
|
|
source = cls()
|
|
|
return {k: getattr(source, k) for k in source._fields}
|
|
|
|