From: Christian Van Wambeke Date: Wed, 20 Jun 2018 06:38:50 +0000 (+0200) Subject: random log simultaneous sat processes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=89d4c9e3e5b26a0cded397bcfb09b0da19bb7361;p=tools%2Fsat.git random log simultaneous sat processes --- diff --git a/src/loggingSat.py b/src/loggingSat.py index 2970c31..8e87a7f 100755 --- a/src/loggingSat.py +++ b/src/loggingSat.py @@ -50,6 +50,7 @@ more TMP/*xml TMP/OUT/*.txt import os import sys import time +import random import logging as LOGI from logging.handlers import BufferingHandler import pprint as PP @@ -477,6 +478,7 @@ class LoggerSat(LOGI.Logger): fileXml = os.path.join(log_dir, nameFileXml) fileTxt = os.path.join(log_dir_out, nameFileTxt) if os.path.exists(fileXml): + time.sleep(random.random()/10.) #avoid next collisions of simultaneous sat processes continue else: ok = True