reformat code and job array
This commit is contained in:
parent
a665ccd4fe
commit
9ff857db9f
64 changed files with 1497 additions and 2476 deletions
|
|
@ -7,10 +7,8 @@
|
|||
#include "cluster.h"
|
||||
#include "xce/cluster_def.h"
|
||||
|
||||
static int
|
||||
do_update_resvals(cluster_t* c,
|
||||
endpoint_t* ep,
|
||||
xce_request_t* request)
|
||||
static int do_update_resvals(cluster_t* c, endpoint_t* ep,
|
||||
xce_request_t* request)
|
||||
{
|
||||
ep_private_t* priv = NULL;
|
||||
int rc = -EPERM;
|
||||
|
|
@ -27,25 +25,20 @@ do_update_resvals(cluster_t* c,
|
|||
if ((priv->role == HostRole_worker) && (idx >= 0)) {
|
||||
worker_t* w;
|
||||
|
||||
w = workermgr_lock_byid(&(c->workermgr),
|
||||
idx, OBJREF_UPDATE);
|
||||
w = workermgr_lock_byid(&(c->workermgr), idx, OBJREF_UPDATE);
|
||||
if (w == NULL) {
|
||||
rc = -E_XCE_BAD_WORKER;
|
||||
} else {
|
||||
xce_update_data_t* updatemsg = request->body.updatemsg;
|
||||
xce_resval_list_t* resvals = updatemsg->data.resvals;
|
||||
|
||||
xce_run_hooks(&(c->hooksys),
|
||||
XCE_CONTROLLER_HOOK_RESOURCE,
|
||||
HOOK_BEFORE_EVENT,
|
||||
HOOK_DETAIL_RESOURCE_UPDATE,
|
||||
c, resvals);
|
||||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_RESOURCE,
|
||||
HOOK_BEFORE_EVENT, HOOK_DETAIL_RESOURCE_UPDATE, c,
|
||||
resvals);
|
||||
rc = update_resval_list(c, w, resvals);
|
||||
xce_run_hooks(&(c->hooksys),
|
||||
XCE_CONTROLLER_HOOK_RESOURCE,
|
||||
HOOK_AFTER_EVENT,
|
||||
HOOK_DETAIL_RESOURCE_UPDATE,
|
||||
c, resvals);
|
||||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_RESOURCE,
|
||||
HOOK_AFTER_EVENT, HOOK_DETAIL_RESOURCE_UPDATE, c,
|
||||
resvals);
|
||||
DEREF_OBJ(w);
|
||||
}
|
||||
}
|
||||
|
|
@ -58,8 +51,7 @@ do_update_resvals(cluster_t* c,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int do_update_jobrusage(cluster_t* c,
|
||||
endpoint_t* ep,
|
||||
static int do_update_jobrusage(cluster_t* c, endpoint_t* ep,
|
||||
xce_request_t* request)
|
||||
{
|
||||
int rc = 0;
|
||||
|
|
@ -75,9 +67,7 @@ static int do_update_jobrusage(cluster_t* c,
|
|||
return rc;
|
||||
}
|
||||
|
||||
int do_update_op(cluster_t* c,
|
||||
endpoint_t* ep,
|
||||
xce_request_t* request)
|
||||
int do_update_op(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
||||
{
|
||||
int rc = 0;
|
||||
xce_reply_t reply;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue