Private
Public Access
1
0

removing obsolete code

This commit is contained in:
Sander Roosendaal
2021-01-16 11:27:32 +01:00
parent 31eebb06bd
commit 05a747b3c2

View File

@@ -1903,9 +1903,7 @@ def handle_otwsetpower(self,f1, boattype, boatclass, coastalbrand, weightvalue,
progressurl += "/rowers/record-progress/" progressurl += "/rowers/record-progress/"
progressurl += job_id+'/' progressurl += job_id+'/'
goservice = True
if goservice:
# do something (this should return from go service) # do something (this should return from go service)
with grpc.insecure_channel( with grpc.insecure_channel(
target='localhost:50051', target='localhost:50051',
@@ -1943,37 +1941,6 @@ def handle_otwsetpower(self,f1, boattype, boatclass, coastalbrand, weightvalue,
except IOError: except IOError:
rowdata = rdata(csvfile) rowdata = rdata(csvfile)
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))
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) update_strokedata(workoutid, rowdata.df, debug=debug)
totaltime = rowdata.df['TimeStamp (sec)'].max( totaltime = rowdata.df['TimeStamp (sec)'].max(