forked from lei.chen/myxce
reformat code and job array
This commit is contained in:
parent
a665ccd4fe
commit
9ff857db9f
64 changed files with 1497 additions and 2476 deletions
|
|
@ -13,16 +13,14 @@ void queue_fini(queue_t* q)
|
|||
}
|
||||
}
|
||||
|
||||
queue_t* create_queue(cluster_t* c,
|
||||
xce_queue_t* p)
|
||||
queue_t* create_queue(cluster_t* c, xce_queue_t* p)
|
||||
{
|
||||
queue_t q1;
|
||||
queue_t* q;
|
||||
|
||||
memcpy(&(q1.queue), p, sizeof(q1.queue));
|
||||
|
||||
q = create_obj_by_typename(&(c->objmgr), "xqueue",
|
||||
&q1);
|
||||
q = create_obj_by_typename(&(c->objmgr), "xqueue", &q1);
|
||||
return q;
|
||||
}
|
||||
|
||||
|
|
@ -94,20 +92,15 @@ int queue_ctrl(cluster_t* c, xce_queuectrl_t* ctrl)
|
|||
break;
|
||||
}
|
||||
if (rc == 0) {
|
||||
xce_run_hooks(&(c->hooksys),
|
||||
XCE_CONTROLLER_HOOK_QUEUE,
|
||||
HOOK_AFTER_EVENT,
|
||||
HOOK_DETAIL_QUEUE_UPDATE,
|
||||
c, q);
|
||||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_QUEUE,
|
||||
HOOK_AFTER_EVENT, HOOK_DETAIL_QUEUE_UPDATE, c, q);
|
||||
}
|
||||
clean:
|
||||
obj_deref(q);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int do_queuecontrol_op(cluster_t* c,
|
||||
endpoint_t* ep,
|
||||
xce_request_t* request)
|
||||
int do_queuecontrol_op(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
||||
{
|
||||
int rc = 0;
|
||||
xce_reply_t reply;
|
||||
|
|
@ -122,16 +115,14 @@ int do_queuecontrol_op(cluster_t* c,
|
|||
return rc;
|
||||
}
|
||||
|
||||
int get_queue_exec(cluster_t* c,
|
||||
char* queue,
|
||||
char** pre_exec,
|
||||
char** post_exec)
|
||||
int get_queue_exec(cluster_t* c, char* queue, char** pre_exec, char** post_exec)
|
||||
{
|
||||
queue_t* q = NULL;
|
||||
|
||||
TRACE("entering %s", __func__);
|
||||
|
||||
if ((c == NULL) || (queue == NULL) || (pre_exec == NULL) || (post_exec == NULL)) {
|
||||
if ((c == NULL) || (queue == NULL) || (pre_exec == NULL)
|
||||
|| (post_exec == NULL)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue