diff --git a/analytics/consumer.py b/analytics/consumer.py index 33b9c26c..297a878a 100644 --- a/analytics/consumer.py +++ b/analytics/consumer.py @@ -1,7 +1,7 @@ import logging +import time from threading import Thread import json -import monotonic import backoff @@ -81,11 +81,11 @@ def next(self): queue = self.queue items = [] - start_time = monotonic.monotonic() + start_time = time.monotonic() total_size = 0 while len(items) < self.upload_size: - elapsed = monotonic.monotonic() - start_time + elapsed = time.monotonic() - start_time if elapsed >= self.upload_interval: break try: diff --git a/requirements.txt b/requirements.txt index 4888d8ed..668faf98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,7 +41,6 @@ MarkupSafe==2.1.3 mccabe==0.6.1 mistune==0.8.4 mock==2.0.0 -monotonic==1.6 multidict==5.1.0 packaging==21.0 pbr==5.11.1 diff --git a/segment/analytics/consumer.py b/segment/analytics/consumer.py index 27586284..208dfb58 100644 --- a/segment/analytics/consumer.py +++ b/segment/analytics/consumer.py @@ -1,6 +1,6 @@ import logging +import time from threading import Thread -import monotonic import backoff import json @@ -80,11 +80,11 @@ def next(self): queue = self.queue items = [] - start_time = monotonic.monotonic() + start_time = time.monotonic() total_size = 0 while len(items) < self.upload_size: - elapsed = monotonic.monotonic() - start_time + elapsed = time.monotonic() - start_time if elapsed >= self.upload_interval: break try: diff --git a/setup.py b/setup.py index fbc1d066..f924d6dd 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,6 @@ install_requires = [ "requests~=2.7", - "monotonic~=1.5", "backoff~=2.1", "python-dateutil~=2.2" ]