copr-backend*: copr-ping: work with rounded seconds

This commit is contained in:
Pavel Raiskup 2023-02-09 17:00:19 +01:00
parent 6e9d9a5bd9
commit 0613f46b41

View file

@ -28,7 +28,7 @@ logging.basicConfig(
)
LOG = logging.getLogger()
NOW = time.time()
NOW = int(time.time())
def _main():
@ -64,7 +64,7 @@ def _main():
start = int(values["start"])
since_last_stop = NOW - stop
measured_time = since_last_stop - CRON_PERIOD
took = stop - start
took = int(stop - start)
if measured_time > ERR_TIME:
LOG.error("%s seconds since the last successful build, allowed %s seconds",