orchestrator: Monitor status of parts
When a phase is started or stopped, add a line to the to output. This should help users keep track of what is happening in case the part takes a long time to run. JIRA: COMPOSE-3287 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
d7ef86293e
commit
31ef7736aa
4 changed files with 64 additions and 0 deletions
25
bin/pungi-notification-report-progress
Executable file
25
bin/pungi-notification-report-progress
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('cmd')
|
||||
opts = parser.parse_args()
|
||||
|
||||
data = json.load(sys.stdin)
|
||||
compose = data["location"]
|
||||
|
||||
dest = os.environ["_PUNGI_ORCHESTRATOR_PROGRESS_MONITOR"]
|
||||
|
||||
with open(dest, "a") as f:
|
||||
if opts.cmd == "phase-start":
|
||||
print("%s: phase %s started" % (compose, data["phase_name"]), file=f)
|
||||
elif opts.cmd == "phase-stop":
|
||||
print("%s: phase %s finished" % (compose, data["phase_name"]), file=f)
|
||||
Loading…
Add table
Add a link
Reference in a new issue