remove deprecation errors

worker.state raises a deprecation error.
change it by worker.get_state