Ending worker when work is done