Pause a job which has been running; i.e, tell the job to wait for something external to happen. It'll unlock the job, update the status, add the results for every finished task so far ... job - the job Object. It'll be saved to the backend with the provided properties to ensure job status persistence. callback - f(err, job) callback will be called with error if something fails, otherwise it'll return the updated job using getJob.
function pauseJob(job, callback) {
            if (!jobs[job.uuid]) {
                return callback(new e.BackendResourceNotFoundError(sprintf(
                  'Job with uuid \'%s\' does not exist', job.uuid)));
            } else if (jobs[job.uuid].execution !== 'running') {
                return callback(new e.BackendPreconditionFailedError(
                  'Only running jobs can be paused'));
            } else {
                job.runner_id = null;
                job.execution = 'waiting';
                jobs[job.uuid] = clone(job);
                waiting_jobs.push(job.uuid);
                return callback(null, job);
            }
        }