Browse Source

Print a message when we start the Zuul console

The link for the job console is made available before Ansible starts
printing things. If the console is empty, users will be greeted with
an "END OF STREAM" message and will need to keep refreshing until there
is actual content.

Writing a minimal message to "start" the console will prevent that.

Change-Id: I4200c91b468b1c2fcccee23dda19962b30335ef5
changes/25/524225/2
David Moreau Simard 5 years ago
parent
commit
57965e33f3
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
  1. 6
      zuul/executor/server.py

6
zuul/executor/server.py

@ -358,8 +358,10 @@ class JobDir(object):
# there is a period of time where the user can click on the live log
# link on the status page but the log streaming fails because the file
# is not there yet.
with open(self.job_output_file, 'w'):
pass
with open(self.job_output_file, 'w') as job_output:
job_output.write("{now} | Job console starting...\n".format(
now=datetime.datetime.now()
))
self.trusted_projects = []
self.trusted_project_index = {}

Loading…
Cancel
Save