Skip to content

(fix): refactor batch_event_processor to reset deadline after it passes. #227

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

Merged
merged 11 commits into from
Dec 14, 2019
Merged
Prev Previous commit
Next Next commit
fix lint error
  • Loading branch information
thomaszurkan-optimizely committed Dec 12, 2019
commit c66db1b37638229a021a9d0f9a23fec2f3a44907
3 changes: 2 additions & 1 deletion optimizely/event/event_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def _run(self):
while True:
if self._get_time() >= self.flushing_interval_deadline:
self._flush_queue()
self.flushing_interval_deadline = self._get_time() + self._get_time(self.flush_interval.total_seconds())
self.flushing_interval_deadline = self._get_time() + \
self._get_time(self.flush_interval.total_seconds())

try:
interval = self._get_time(self.flush_interval.total_seconds()) - self._get_time()
Expand Down