added condition for running worker