def threaded_encode_job(job): """ Given a job, run it through its encoding workflow in a non-blocking manner. """ # Update the timestamp for when the node last did something so it # won't terminate itself. NodeStateManager.i_did_something() job.nommer.onomnom()
def wrapped_set_job_state(self, *args, **kwargs): """ Wraps set_job_state() to perform extra actions before and/or after job state updates. :param str new_state: The job state to set. """ # Tracks the fact that we did something, prevents the node from # terminating itself. NodeStateManager.i_did_something() self.job.set_job_state(*args, **kwargs)