Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions customerio/analytics/consumer.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ authors = [
]
dependencies = [
"requests>=2.32.4",
"monotonic~=1.6",
"backoff~=2.2",
"python-dateutil~=2.8",
]
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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