changes to fix failed jobs
This commit is contained in:
@@ -1178,7 +1178,7 @@ def handle_check_race_course(self,
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
record = VirtualRaceResult.object.get(id=recordid)
|
record = VirtualRaceResult.objects.get(id=recordid)
|
||||||
record.duration = totaltime_sec_to_string(0)
|
record.duration = totaltime_sec_to_string(0)
|
||||||
record.distance = 0
|
record.distance = 0
|
||||||
record.workoutid = workoutid
|
record.workoutid = workoutid
|
||||||
@@ -2648,7 +2648,7 @@ def handle_makeplot(f1, f2, t, hrdata, plotnr, imagename,
|
|||||||
df = df.select_types(['number'])
|
df = df.select_types(['number'])
|
||||||
df = row.df.groupby(lambda x: x / bin).mean()
|
df = row.df.groupby(lambda x: x / bin).mean()
|
||||||
row.df = df
|
row.df = df
|
||||||
except TypeError:
|
except:
|
||||||
pass
|
pass
|
||||||
nr_rows = len(row.df)
|
nr_rows = len(row.df)
|
||||||
if (plotnr == 1):
|
if (plotnr == 1):
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -104,10 +104,16 @@ def failed_job_view(request, id=0): # pragma: no cover
|
|||||||
if not request.user.is_staff:
|
if not request.user.is_staff:
|
||||||
raise PermissionDenied("Not Allowed")
|
raise PermissionDenied("Not Allowed")
|
||||||
|
|
||||||
q = Queue('failed', connection=Redis())
|
for queuename in ['high','default','low']:
|
||||||
thejob = q.fetch_job(id)
|
q = Queue(queuename, connection=Redis())
|
||||||
|
reqistry = q.failed_job_registry
|
||||||
thejob.delete()
|
for tid in registry.get_job_ids():
|
||||||
|
if tid == id:
|
||||||
|
try:
|
||||||
|
job = Job.fetch(id, connection=Redis())
|
||||||
|
registry.remove(id, delete_job=True)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return HttpResponseRedirect(reverse('failed_queue_view'))
|
return HttpResponseRedirect(reverse('failed_queue_view'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user