Skip to content

Commit

Permalink
Merge pull request #149 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mikeseibel authored Nov 6, 2020
2 parents a4fc1f3 + a4b297b commit cce6d6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/management_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def handler(signum, frame):
report("exception: {}".format(ex), error=True)

finish = time.time()
duration = finish - start

management_daemon_command_exit.labels(
command, release_id).set(rv if rv and isinstance(rv, int) else 0)
Expand All @@ -125,10 +126,11 @@ def handler(signum, frame):
management_daemon_command_finish.labels(
command, release_id).set(finish)
management_daemon_command_duration.labels(
command, release_id).set(finish - start)
command, release_id).set(duration)

if not finish_signal:
time.sleep(loop_delay)
delay_delta = loop_delay - int(duration)
if delay_delta > 0 and not finish_signal:
time.sleep(delay_delta)


if __name__ == '__main__':
Expand Down

0 comments on commit cce6d6e

Please sign in to comment.