Private
Public Access
1
0

small fixes and additional logging for rp3

This commit is contained in:
Sander Roosendaal
2021-10-12 18:01:20 +02:00
parent 851e4814ae
commit 6145530dc2
3 changed files with 10 additions and 2 deletions

View File

@@ -12,6 +12,8 @@ import gzip
import base64
from io import BytesIO
from rowers.utils import dologging
import django_rq
queue = django_rq.get_queue('default')
queuelow = django_rq.get_queue('low')
@@ -135,6 +137,7 @@ def get_rp3_workouts(rower,do_async=True): # pragma: no cover
if (res.status_code != 200):
return 0
dologging('rp3_import.log',res.json())
workouts_list = pd.json_normalize(res.json()['data']['workouts'])
try:
rp3ids = workouts_list['id'].values
@@ -150,6 +153,7 @@ def get_rp3_workouts(rower,do_async=True): # pragma: no cover
for id in newids:
startdatetime = workouts_list.loc[id,'executed_at']
dologging('rp3_import.log',startdatetime)
job = myqueue(
queuehigh,