mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
Do not discard jobs w/ .started=None
This commit is contained in:
@@ -44,11 +44,10 @@ class AWXInstance:
|
|||||||
def jobs_pretty(self):
|
def jobs_pretty(self):
|
||||||
jobs = []
|
jobs = []
|
||||||
for j in self.jobs():
|
for j in self.jobs():
|
||||||
if not j.started:
|
job_started = j.started if j.started else now()
|
||||||
continue
|
|
||||||
# similar calculation of `elapsed` as the corresponding serializer
|
# similar calculation of `elapsed` as the corresponding serializer
|
||||||
# does
|
# does
|
||||||
td = now() - j.started
|
td = now() - job_started
|
||||||
elapsed = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / (10**6 * 1.0)
|
elapsed = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / (10**6 * 1.0)
|
||||||
elapsed = float(elapsed)
|
elapsed = float(elapsed)
|
||||||
details = dict(
|
details = dict(
|
||||||
@@ -76,7 +75,7 @@ class Command(BaseCommand):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def ge_1(arg):
|
def ge_1(arg):
|
||||||
if arg == "inf":
|
if arg == "inf":
|
||||||
return float(arg)
|
return float("inf")
|
||||||
|
|
||||||
int_arg = int(arg)
|
int_arg = int(arg)
|
||||||
if int_arg < 1:
|
if int_arg < 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user