zk_update_monitor.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:kingpin 作者: pinterest 项目源码 文件源码
def _notification_processor():
    while True:
        (zk_path, command, value, version, max_wait_in_secs,
         watch_type, notification_timestamp) = _NOTIFICATION_EVENT_QUEUE.get()

        if zk_path == "kill":
            _kill("Restart via kill api")

        # ignore all notifications with an older version
        if _is_older_version(zk_path, version, notification_timestamp):
            continue

        # TODO: we need to deal with it if the number of spawned greenlets
        # becomes an issue.
        gevent.spawn(_process_notification, command, value, version,
                     max_wait_in_secs, watch_type, zk_path,
                     notification_timestamp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号