mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 22:05:07 -02:30
Compare float to float
* https://sonarcloud.io/project/issues?open=AZDmRaXd2PiUXMD3dXkF&id=ansible_awx&tab=code
This commit is contained in:
committed by
Chris Meyers
parent
ed5ab8becd
commit
125083538a
@@ -918,7 +918,7 @@ class UnifiedJob(
|
|||||||
|
|
||||||
# If we have a start and finished time, and haven't already calculated
|
# If we have a start and finished time, and haven't already calculated
|
||||||
# out the time that elapsed, do so.
|
# out the time that elapsed, do so.
|
||||||
if self.started and self.finished and self.elapsed == 0.0:
|
if self.started and self.finished and self.elapsed == decimal.Decimal(0):
|
||||||
td = self.finished - self.started
|
td = self.finished - self.started
|
||||||
elapsed = decimal.Decimal(td.total_seconds())
|
elapsed = decimal.Decimal(td.total_seconds())
|
||||||
self.elapsed = elapsed.quantize(dq)
|
self.elapsed = elapsed.quantize(dq)
|
||||||
|
|||||||
Reference in New Issue
Block a user