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
This commit is contained in:
David Moreau Simard 2017-11-30 10:51:30 -05:00
parent 0015fda37b
commit 57965e33f3
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
1 changed files with 4 additions and 2 deletions

View File

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