Private
Public Access
1
0

imports no stroke data by creating synthetic workout

This commit is contained in:
Sander Roosendaal
2018-01-19 16:54:55 +01:00
parent 0d1be41e6e
commit 45703f4946
4 changed files with 115 additions and 77 deletions

View File

@@ -56,7 +56,7 @@ def add(x, y):
@app.task
def handle_c2_import_stroke_data(c2token,
c2id,workoutid,
startdatetime,
starttimeunix,
csvfilename,debug=True):
authorizationstring = str('Bearer ' + c2token)
headers = {'Authorization': authorizationstring,
@@ -66,7 +66,6 @@ def handle_c2_import_stroke_data(c2token,
s = requests.get(url,headers=headers)
if s.status_code == 200:
strokedata = pd.DataFrame.from_dict(s.json()['data'])
starttimeunix = arrow.get(startdatetime).timestamp
result = add_c2_stroke_data_db(
strokedata,workoutid,starttimeunix,
csvfilename,debug=debug,