diff --git a/requirements.txt b/requirements.txt index 86e57035..58eb6402 100644 --- a/requirements.txt +++ b/requirements.txt @@ -72,6 +72,8 @@ fsspec==0.5.2 future==0.17.1 geocoder==1.38.1 geos==0.2.1 +grpcio==1.26.0 +grpcio-tools==1.26.0 holoviews==1.11.3 html5lib==1.0.1 htmlmin==0.1.12 @@ -93,6 +95,7 @@ itypes==1.1.0 jedi==0.13.3 jeepney==0.4 Jinja2==2.10 +json5==0.8.5 jsonschema==3.0.1 jupyter==1.0.0 jupyter-client==5.2.4 @@ -140,6 +143,7 @@ pip-upgrader==1.4.6 pluggy==0.9.0 prometheus-client==0.6.0 prompt-toolkit==2.0.9 +protobuf==3.11.1 psycopg2==2.8.1 ptyprocess==0.6.0 py==1.8.0 @@ -169,7 +173,7 @@ ratelim==0.1.6 redis==3.2.1 requests==2.21.0 requests-oauthlib==1.2.0 -rowingdata==2.5.5 +rowingdata==2.5.7 rowingphysics==0.5.0 rq==0.13.0 scipy==1.2.1 diff --git a/rowers/tasks.py b/rowers/tasks.py index cbd62a7c..7edad3ed 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -1523,7 +1523,6 @@ def handle_otwsetpower(self,f1, boattype, weightvalue, if 'go_service' in kwargs: goservice = kwargs['go_service'] - print('Setting goservice to ', goservice) else: goservice = False @@ -1541,7 +1540,6 @@ def handle_otwsetpower(self,f1, boattype, weightvalue, csvfile = f1+'.gz' csvfile = os.path.abspath(csvfile) - print('csvfile ',csvfile) # do something with boat type try: @@ -1594,38 +1592,42 @@ def handle_otwsetpower(self,f1, boattype, weightvalue, secret = secret, silent = False, ),timeout=600) - return response.result + result = response.result + if result == 0: + # send failure email + return 0 + + else: + boatfile = { + '1x': 'static/rigging/1x.txt', + '2x': 'static/rigging/2x.txt', + '2-': 'static/rigging/2-.txt', + '4x': 'static/rigging/4x.txt', + '4-': 'static/rigging/4-.txt', + '8+': 'static/rigging/8+.txt', + } + try: + rg = rowingdata.getrigging(boatfile[boattype]) + except KeyError: + rg = rowingdata.getrigging('static/rigging/1x.txt') + + # determine cache file name + physics_cache = 'media/'+str(boattype)+'_'+str(int(weightvalue)) - boatfile = { - '1x': 'static/rigging/1x.txt', - '2x': 'static/rigging/2x.txt', - '2-': 'static/rigging/2-.txt', - '4x': 'static/rigging/4x.txt', - '4-': 'static/rigging/4-.txt', - '8+': 'static/rigging/8+.txt', - } - try: - rg = rowingdata.getrigging(boatfile[boattype]) - except KeyError: - rg = rowingdata.getrigging('static/rigging/1x.txt') + rowdata.otw_setpower(skiprows=5, mc=weightvalue, rg=rg, + powermeasured=powermeasured, + progressurl=progressurl, + secret=secret, + silent=True, + usetable=usetable,storetable=physics_cache, + ) - # determine cache file name - physics_cache = 'media/'+str(boattype)+'_'+str(int(weightvalue)) + # save data + rowdata.write_csv(f1, gzip=True) - - - rowdata.otw_setpower(skiprows=5, mc=weightvalue, rg=rg, - powermeasured=powermeasured, - progressurl=progressurl, - secret=secret, - silent=True, - usetable=usetable,storetable=physics_cache, - ) - - # save data - rowdata.write_csv(f1, gzip=True) + # continuing for both update_strokedata(workoutid, rowdata.df, debug=debug) totaltime = rowdata.df['TimeStamp (sec)'].max(