diff --git a/customerio/analytics/consumer.py b/customerio/analytics/consumer.py index 8f478b54..f00b4521 100644 --- a/customerio/analytics/consumer.py +++ b/customerio/analytics/consumer.py @@ -1,10 +1,10 @@ import json import logging +import time from queue import Empty from threading import Thread import backoff -import monotonic from customerio.analytics.request import post, APIError, DatetimeSerializer @@ -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/pyproject.toml b/pyproject.toml index 2192448b..dbebe4f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,6 @@ authors = [ ] dependencies = [ "requests>=2.32.4", - "monotonic~=1.6", "backoff~=2.2", "python-dateutil~=2.8", ] diff --git a/requirements.txt b/requirements.txt index 6a9d363f..62366587 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ backoff==2.2.1 flake8==3.7.9 -monotonic==1.6 pylint==3.3.3 python-dateutil==2.8.2 requests>=2.32.4 \ No newline at end of file