made everything work with async
This commit is contained in:
@@ -210,6 +210,10 @@ def handle_check_race_course(self,
|
||||
else:
|
||||
debug = False
|
||||
|
||||
mode = 'race'
|
||||
if 'mode' in kwargs:
|
||||
mode = kwargs['mode']
|
||||
|
||||
columns = ['time',' latitude',' longitude','cum_dist']
|
||||
|
||||
try:
|
||||
@@ -293,6 +297,15 @@ def handle_check_race_course(self,
|
||||
workoutid=workoutid,
|
||||
)
|
||||
|
||||
if mode == 'coursetest':
|
||||
query = 'UPDATE "rowers_coursetestresult" SET "coursecompleted" = 1, "duration" = "{duration}", "distance" = {distance}, "workoutid" = {workoutid} WHERE "id"="{recordid}"'.format(
|
||||
recordid=recordid,
|
||||
duration=totaltime_sec_to_string(coursetimeseconds),
|
||||
distance=int(coursemeters),
|
||||
workoutid=workoutid,
|
||||
)
|
||||
|
||||
|
||||
with engine.connect() as conn, conn.begin():
|
||||
result = conn.execute(query)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user