'Seperated out so we can use the worker threads for it.'

def fail_job(self, job_state, message=GENERIC_REMOTE_ERROR):

    self.stop_job(self.sa_session.query(self.app.model.Job).get(job_state.job_wrapper.job_id))
    job_state.job_wrapper.fail(getattr(job_state, 'fail_message', message))
