[DEV] add tool to generize the wait config
This commit is contained in:
parent
21650b55c8
commit
daa5c8039d
@ -13,6 +13,7 @@ import shutil
|
||||
import errno
|
||||
import fnmatch
|
||||
import stat
|
||||
import time
|
||||
# Local import
|
||||
from realog import debug
|
||||
from . import env
|
||||
@ -295,4 +296,16 @@ def get_list_base_display(id, count, elem):
|
||||
return str(id) + "/" + str(count) + " : " + str(elem.path)
|
||||
|
||||
|
||||
is_first_time_sleep = True
|
||||
|
||||
def wait_for_server_if_needed():
|
||||
global is_first_time_sleep
|
||||
if is_first_time_sleep == False:
|
||||
is_first_time_sleep = True;
|
||||
return
|
||||
if env.get_wait_between_sever_command() != 0:
|
||||
debug.info("Wait for server contrition (" + str(env.get_wait_between_sever_command()) + " s)")
|
||||
time.sleep(env.get_wait_between_sever_command())
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user