Added DeprecationWarning to worker.state.

main
Selwin Ong 11 years ago
parent 2fe5d9e25e
commit 72457d2286

@ -220,6 +220,10 @@ class Worker(object):
connection.hset(self.key, 'state', state)
def _set_state(self, state):
"""Raise a DeprecationWarning if ``worker.state = X`` is used"""
raise DeprecationWarning(
"worker.state is deprecated, use worker.set_state() instead."
)
self.set_state(state)
def get_state(self):

Loading…
Cancel
Save