mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot: workaround for nginx bug leaving orphan worker, blocking port
This commit is contained in:
parent
72bfc504cc
commit
d9c9642675
@ -418,7 +418,13 @@ class runbot_repo(osv.osv):
|
|||||||
os.kill(pid, signal.SIGHUP)
|
os.kill(pid, signal.SIGHUP)
|
||||||
except Exception:
|
except Exception:
|
||||||
_logger.debug('start nginx')
|
_logger.debug('start nginx')
|
||||||
run(['/usr/sbin/nginx', '-p', nginx_dir, '-c', 'nginx.conf'])
|
if run(['/usr/sbin/nginx', '-p', nginx_dir, '-c', 'nginx.conf']):
|
||||||
|
# obscure nginx bug leaving orphan worker listening on nginx port
|
||||||
|
if not run(['pkill', '-f', '-P1', 'nginx: worker']):
|
||||||
|
_logger.debug('failed to start nginx - orphan worker killed, retrying')
|
||||||
|
run(['/usr/sbin/nginx', '-p', nginx_dir, '-c', 'nginx.conf'])
|
||||||
|
else:
|
||||||
|
_logger.debug('failed to start nginx - failed to kill orphan worker - oh well')
|
||||||
|
|
||||||
def killall(self, cr, uid, ids=None, context=None):
|
def killall(self, cr, uid, ids=None, context=None):
|
||||||
# kill switch
|
# kill switch
|
||||||
|
Loading…
Reference in New Issue
Block a user