forked from lei.chen/myxce
save works
This commit is contained in:
parent
acfbec875b
commit
3f74f14687
38 changed files with 751 additions and 448 deletions
|
|
@ -55,6 +55,7 @@ static int handle_worker_join(cluster_t* c, endpoint_t* ep,
|
|||
|
||||
joinmsg = request->body.joinmsg;
|
||||
|
||||
lock(c->workermgr, RTTI_LOCK_WRITE);
|
||||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_WORKER, HOOK_BEFORE_EVENT,
|
||||
HOOK_DETAIL_WORKER_JOIN, c, from->name, 0);
|
||||
idx = add_worker(c, ep, from->name, joinmsg->data.attrs);
|
||||
|
|
@ -65,6 +66,7 @@ static int handle_worker_join(cluster_t* c, endpoint_t* ep,
|
|||
|
||||
xce_run_hooks(&(c->hooksys), XCE_CONTROLLER_HOOK_WORKER, HOOK_AFTER_EVENT,
|
||||
HOOK_DETAIL_WORKER_JOIN, c, from->name, idx);
|
||||
unlock(c->workermgr);
|
||||
if (idx < 0) {
|
||||
ERROR("worker %s join failed, rc %d", from->name, idx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue