Skip to content
Snippets Groups Projects
Commit 160cf52a authored by Mark Grondona's avatar Mark Grondona
Browse files

o new routine "job_state" to check current job state

parent ac5efed6
No related branches found
No related tags found
No related merge requests found
......@@ -171,6 +171,16 @@ update_job_state(job_t *job, job_state_t state)
pthread_mutex_unlock(&job->state_mutex);
}
job_state_t
job_state(job_t *job)
{
job_state_t state;
slurm_mutex_lock(&job->state_mutex);
state = job->state;
slurm_mutex_unlock(&job->state_mutex);
return state;
}
void
job_force_termination(job_t *job)
......
......@@ -145,6 +145,8 @@ typedef struct srun_job {
void update_job_state(job_t *job, job_state_t newstate);
void job_force_termination(job_t *job);
job_state_t job_state(job_t *job);
job_t * job_create_noalloc(void);
job_t * job_create_allocation(resource_allocation_response_msg_t *resp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment