reformat code and job array
This commit is contained in:
parent
a665ccd4fe
commit
9ff857db9f
64 changed files with 1497 additions and 2476 deletions
|
|
@ -7,9 +7,7 @@
|
|||
#include "cluster.h"
|
||||
#include "xce/cluster_def.h"
|
||||
|
||||
int handle_clusterconf(cluster_t* c,
|
||||
endpoint_t* ep,
|
||||
xce_request_t* request)
|
||||
int handle_clusterconf(cluster_t* c, endpoint_t* ep, xce_request_t* request)
|
||||
{
|
||||
/* clang-format off */
|
||||
xce_reply_t reply;
|
||||
|
|
@ -45,26 +43,20 @@ int handle_clusterconf(cluster_t* c,
|
|||
collect_resources(c, NULL, &(clusterconf.reslist.count),
|
||||
&(clusterconf.reslist.res));
|
||||
collect_workers(c, (collect_check_fn_t)check_worker_,
|
||||
&(clusterconf.wlist.count),
|
||||
&(clusterconf.wlist.workers));
|
||||
&(clusterconf.wlist.count), &(clusterconf.wlist.workers));
|
||||
|
||||
xce_reply(ep, c->myhost, &reply);
|
||||
|
||||
for (i = 0; i < clusterconf.wlist.count; i++) {
|
||||
xce_worker_t* w = clusterconf.wlist.workers[i];
|
||||
|
||||
free_resval_with_idx_list(&(w->resvals_to_sched),
|
||||
w->nresvals_to_sched);
|
||||
free_resval_with_idx_list(&(w->resvals_to_sched), w->nresvals_to_sched);
|
||||
}
|
||||
|
||||
deref_objs(clusterconf.cfglist.count,
|
||||
(void**)clusterconf.cfglist.configs);
|
||||
deref_objs(clusterconf.qlist.count,
|
||||
(void**)clusterconf.qlist.queues);
|
||||
deref_objs(clusterconf.reslist.count,
|
||||
(void**)clusterconf.reslist.res);
|
||||
deref_objs(clusterconf.wlist.count,
|
||||
(void**)clusterconf.wlist.workers);
|
||||
deref_objs(clusterconf.cfglist.count, (void**)clusterconf.cfglist.configs);
|
||||
deref_objs(clusterconf.qlist.count, (void**)clusterconf.qlist.queues);
|
||||
deref_objs(clusterconf.reslist.count, (void**)clusterconf.reslist.res);
|
||||
deref_objs(clusterconf.wlist.count, (void**)clusterconf.wlist.workers);
|
||||
|
||||
FREEUP(clusterconf.cfglist.configs);
|
||||
FREEUP(clusterconf.qlist.queues);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue