Added DeprecationWarning to worker.state.