worker: clean the pool if a job failed