Skip to content

Commit f98a896

Browse files
committed
v.04
1 parent e4189bf commit f98a896

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

power_logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
from libs import caribou
3030

31-
VERSION = '0.3'
31+
VERSION = '0.4'
3232

3333
LOG_LEVELS = ['debug', 'info', 'warning', 'error', 'critical']
3434

@@ -204,7 +204,7 @@ def upload_data_to_endpoint(local_stop_signal):
204204
logging.info(f"Uploading {len(payload)} rows to: {global_settings['api_url']}")
205205

206206
try:
207-
with urllib.request.urlopen(req) as response:
207+
with urllib.request.urlopen(req, timeout=10) as response:
208208
if response.status == 204:
209209
for p in payload:
210210
tc.execute('UPDATE measurements SET uploaded = ?, data = NULL WHERE id = ?;', (int(time.time()), p['row_id']))

0 commit comments

Comments
 (0)