Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueuedLogHandler worker 终止条件问题 #152

Open
georgexsh opened this issue Jan 21, 2020 · 5 comments
Open

QueuedLogHandler worker 终止条件问题 #152

georgexsh opened this issue Jan 21, 2020 · 5 comments

Comments

@georgexsh
Copy link

georgexsh commented Jan 21, 2020

现在的实现即使队列为空,也要等足 close_wait 这里的必要性是什么呢?

 def _post(self):
     while not self.stop_flag or (time() - self.stop_time) <= self.close_wait:
         items = self._get_batch_log_items(self.put_wait)
         if not items:
             continue

         # 发送逻辑

造成的问题是,在进程结束时,要无谓等待 5 秒钟。

@wjo1212
Copy link
Contributor

wjo1212 commented Jan 21, 2020

@georgexsh 你好,感谢意见,这个版本有更新,因流程一直没同步,这里我直接同步了这个文件的最新版本,请参考是否已经解决这个问题:
c1daeb5

请更新到master分支验证。

@georgexsh
Copy link
Author

评论了一下,我们自己先 monkey patch 了,暂时没空去测试

@wjo1212
Copy link
Contributor

wjo1212 commented Jan 21, 2020

@georgexsh 好的

@georgexsh
Copy link
Author

georgexsh commented Feb 7, 2020

@wjo1212 另外我在 c1daeb5 提了一些问题,不知道你那边能否看到,希望能讨论一下。

@wjo1212
Copy link
Contributor

wjo1212 commented Feb 7, 2020

@georgexsh 感谢回复,意见意见跟进,请查看 c1daeb5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants