Worker state handler