Skip to content

childrenwatch will kill the procedure? #539

Open
@leafjungle

Description

@leafjungle

self._zk_client = get_zk_client()
self._zk_client.start()
ChildrenWatch(self._zk_client, TASK_ZK_PATH, func=self.get_work, send_event=True)
print "123"

def get_work(self, children, event)
.....

I meet some problems:
(1) the event in get_work is always None (I add a child or delete a child), but why?
(2) print "123" will not be executed since the whole procedure is killed after ChildWatch(), without any error msg or log, why?

And I am wondering the work mechanism of ChildrenWatch and DataWatch.
proc1: register ChildrenWatch with an action function.
proc2: add child to the path.

then proc1 should always run , right? otherwise how does zookeeper server notify the client?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions