forked from lei.chen/myxce
save works
This commit is contained in:
parent
f4b1ba4cd7
commit
acfbec875b
51 changed files with 622 additions and 1175 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include "worker.h"
|
||||
#include "xce/errnox.h"
|
||||
#include "xstring.h"
|
||||
#include "jobj.h"
|
||||
|
||||
static xce_peerinfo_t from_controller
|
||||
= { .name = "controller", .key = "keepSecret" };
|
||||
|
|
@ -371,7 +372,7 @@ int cluster_build_resources(cluster_t* c)
|
|||
for (i = 0; i < c->myconf->cluster_config->nres; i++) {
|
||||
xce_resource_t* res;
|
||||
|
||||
res = makeResource(c->myconf->cluster_config->resources[i]);
|
||||
res = makeResource(c->resmgr, c->myconf->cluster_config->resources[i]);
|
||||
if (res == NULL) {
|
||||
return -errno;
|
||||
}
|
||||
|
|
@ -568,7 +569,6 @@ int cluster_init(cluster_t* c)
|
|||
|
||||
c->configmgr = makeInstance(&xkvmgr_type, &config_mgr_params);
|
||||
|
||||
objmgr_init(&(c->objmgr));
|
||||
c->jobmgr = makeInstance(&xkvmgr_type, &jobmgr_params);
|
||||
c->resmgr = makeInstance(&xkvmgr_type, &resmgr_params);
|
||||
zarray_init(&(c->sharedinst), c->myconf->cluster_config->resmgr->inst_delta,
|
||||
|
|
@ -580,6 +580,7 @@ int cluster_init(cluster_t* c)
|
|||
iomgr_set_ssl_ctx(&(c->iomgr), ssl_ctx);
|
||||
|
||||
xstring_table_init(c->myconf->cluster_config->xstrings->nhash_slots);
|
||||
job_obj_init(5381, 5381);
|
||||
|
||||
zarray_init(&(c->endpoints), 16, endpoint_killer);
|
||||
|
||||
|
|
@ -775,12 +776,12 @@ void cluster_fini(cluster_t* c)
|
|||
zarray_fini(&(c->endpoints));
|
||||
zarray_fini(&(c->configs));
|
||||
|
||||
objmgr_fini(&(c->objmgr));
|
||||
|
||||
xce_hook_fini(&(c->hooksys));
|
||||
|
||||
cleanup_openssl();
|
||||
|
||||
job_obj_fini();
|
||||
|
||||
xstring_table_fini();
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue