Skip to content

Commit

Permalink
v.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ribalba committed Nov 21, 2023
1 parent e4189bf commit f98a896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions power_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from libs import caribou

VERSION = '0.3'
VERSION = '0.4'

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

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

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

0 comments on commit f98a896

Please sign in to comment.