save works
This commit is contained in:
parent
f4b1ba4cd7
commit
acfbec875b
51 changed files with 622 additions and 1175 deletions
|
|
@ -170,7 +170,6 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
|
|||
|
||||
nc = alloc->nhosts;
|
||||
if (nc <= 0) {
|
||||
obj_deref(j);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +187,6 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
|
|||
|
||||
if (w == NULL) {
|
||||
free_launchinfo(&launchinfo);
|
||||
obj_deref(j);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
|
|
@ -197,9 +195,6 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
|
|||
w->host.name, w->host.status, w->ep);
|
||||
free_launchinfo(&launchinfo);
|
||||
|
||||
obj_deref(w);
|
||||
obj_deref(j);
|
||||
|
||||
SET_ERROR(E_XCE_BAD_WORKER);
|
||||
return -errno;
|
||||
}
|
||||
|
|
@ -211,17 +206,13 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
|
|||
|
||||
rc = get_queue_exec(c, j->job.submit->queue, &q_pre_exec, &q_post_exec);
|
||||
if (rc < 0) {
|
||||
obj_deref(j);
|
||||
obj_deref(w);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (j->job.submit->start_info->q_pre_exec != NULL) {
|
||||
obj_deref(j->job.submit->start_info->q_pre_exec);
|
||||
}
|
||||
|
||||
if (j->job.submit->start_info->q_post_exec != NULL) {
|
||||
obj_deref(j->job.submit->start_info->q_post_exec);
|
||||
}
|
||||
|
||||
j->job.submit->start_info->q_pre_exec = q_pre_exec;
|
||||
|
|
@ -245,8 +236,6 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
|
|||
MOVE_PTR(j->job.allocs->allocs, allocs);
|
||||
alloc->allocs = NULL;
|
||||
|
||||
DEREF_OBJ(w);
|
||||
DEREF_OBJ(j);
|
||||
|
||||
if (rc < 0) {
|
||||
SET_ERROR(-rc);
|
||||
|
|
@ -299,7 +288,6 @@ int job_ctrl(cluster_t* c, xce_jobctrl_t* ctrinfo)
|
|||
w->host.name, w->host.status, w->ep);
|
||||
rc = -errno;
|
||||
}
|
||||
obj_deref(w);
|
||||
} else {
|
||||
rc = -errno;
|
||||
}
|
||||
|
|
@ -365,7 +353,6 @@ int job_ctrl(cluster_t* c, xce_jobctrl_t* ctrinfo)
|
|||
}
|
||||
}
|
||||
|
||||
obj_deref(j);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -424,8 +411,6 @@ int handle_jobdispatch(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
|||
|
||||
static int xlist_deref_job_item_(job_t* j, void* arg)
|
||||
{
|
||||
obj_deref(j);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -481,7 +466,6 @@ int handle_jobsubmit(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
|||
} else {
|
||||
if (xlist_store(&jlist, j) < 0) {
|
||||
PERROR("xlist_store");
|
||||
obj_deref(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -748,7 +732,6 @@ int on_job_ckpt(cluster_t* c, endpoint_t* ep, xce_ckptinfo_t* ckptinfo)
|
|||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_JOB, HOOK_BEFORE_EVENT,
|
||||
HOOK_DETAIL_JOB_CKPT, c, j);
|
||||
if (j->job.ckptinfo != NULL) {
|
||||
obj_deref(j->job.ckptinfo);
|
||||
}
|
||||
|
||||
j->job.ckptinfo = makeString(info);
|
||||
|
|
@ -756,8 +739,6 @@ int on_job_ckpt(cluster_t* c, endpoint_t* ep, xce_ckptinfo_t* ckptinfo)
|
|||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_JOB, HOOK_AFTER_EVENT,
|
||||
HOOK_DETAIL_JOB_CKPT, c, j);
|
||||
|
||||
obj_deref(j);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -796,13 +777,10 @@ int update_job_rusages(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
|||
|
||||
w = get_ep_worker(c, ep);
|
||||
if (w == NULL) {
|
||||
obj_deref(j);
|
||||
return errno;
|
||||
}
|
||||
|
||||
host = makeString(w->host.name);
|
||||
obj_deref(w);
|
||||
|
||||
if (host == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
@ -825,7 +803,6 @@ int update_job_rusages(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
|||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_JOB, HOOK_AFTER_EVENT,
|
||||
HOOK_DETAIL_JOB_UPDATE, c, j);
|
||||
|
||||
obj_deref(j);
|
||||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_JOB, HOOK_AFTER_EVENT,
|
||||
HOOK_DETAIL_JOB_RUSAGE_UPDATE, c, rusages);
|
||||
|
||||
|
|
@ -923,7 +900,6 @@ int do_clr_preason(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
|||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_JOB, HOOK_BEFORE_EVENT,
|
||||
HOOK_DETAIL_CLRPREASON, c, j);
|
||||
|
||||
obj_deref(j);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue