[IMP] do not fail if cannot delete the pidfile. It may have a race-condition when in multi-workers.
bzr revid: chs@openerp.com-20140423150117-nyt16snzwvey2vz4
This commit is contained in:
parent
981f683f0f
commit
156225f9ea
|
@ -81,8 +81,11 @@ def report_configuration():
|
|||
|
||||
def rm_pid_file():
|
||||
config = openerp.tools.config
|
||||
if not openerp.evented and os.path.exists(config['pidfile']):
|
||||
if not openerp.evented and config['pidfile']:
|
||||
try:
|
||||
os.unlink(config['pidfile'])
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def setup_pid_file():
|
||||
""" Create a file with the process id written in it.
|
||||
|
|
Loading…
Reference in New Issue