Codesign: Wait for unsigned directory to appear

Solves problem with different order of codesign server startup and
mount of network shares: avoids exception happening when server is
started prior to the mounts are ready.
This commit is contained in:
Sergey Sharybin 2020-06-30 11:21:00 +02:00
parent 53799d3ed2
commit 7860fc9539
1 changed files with 5 additions and 0 deletions

View File

@ -337,6 +337,11 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
# TOOD(sergey): Support graceful shutdown on Ctrl-C.
logger_server.info(
f'Waiting for a request directory {self.unsigned_storage_dir} to appear.')
while not self.unsigned_storage_dir.exists():
time.sleep(1)
logger_server.info(
'Waiting for a READY indicator of any signing request.')
request_id = None