Skip to content

Commit 77764ce

Browse files
sarrubiapatricioe
authored andcommitted
Merge pull request splitio#49 from splitio/hotfix-remove-stopped
Removed stopped on post impressions
1 parent 3bb171a commit 77764ce

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

splitio/impressions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ def _notify_eviction(self, feature_name, feature_impressions):
304304
def _timer_refresh(self):
305305
"""Responsible for setting the periodic calls to _update_impressions using a Timer thread.
306306
"""
307-
if self._stopped:
308-
return
309307

310308
try:
311309
self._thread_pool_executor.submit(self._update_impressions)

splitio/tests/test_impressions.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -330,18 +330,6 @@ def setUp(self):
330330
self.treatment_log = SelfUpdatingTreatmentLog(self.some_api, interval=self.some_interval)
331331
self.treatment_log.stopped = False
332332

333-
def test_doesnt_call_submit_if_stopped(self):
334-
"""Test that _timer_refresh doesn't call submit on the executor pool if it is stopped"""
335-
self.treatment_log._stopped = True
336-
self.treatment_log._timer_refresh()
337-
self.thread_pool_executor.return_value.submit.assert_not_called()
338-
339-
def test_doesnt_create_timer_if_stopped(self):
340-
"""Test that _timer_refresh doesn't refresh the timer it is stopped"""
341-
self.treatment_log._stopped = True
342-
self.treatment_log._timer_refresh()
343-
self.timer_mock.assert_not_called()
344-
345333
def test_calls_submit(self):
346334
"""Test that _timer_refresh calls submit on the executor pool if it is not stopped"""
347335
self.treatment_log._timer_refresh()

0 commit comments

Comments
 (0)