Skip to content

Commit

Permalink
[FIX] longpolling/gevent: automatically restart worker when killed
Browse files Browse the repository at this point in the history
Whenever the longpolling/gevent worker dies, it
should be automatically restarted by the prefork
server, just like it happens for HTTP workers.
  • Loading branch information
odony committed Nov 5, 2014
1 parent 1719e6b commit 71247ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openerp/service/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ def long_polling_spawn(self):
self.long_polling_pid = popen.pid

def worker_pop(self, pid):
if pid == self.long_polling_pid:
self.long_polling_pid = None
if pid in self.workers:
_logger.debug("Worker (%s) unregistered", pid)
try:
Expand Down

0 comments on commit 71247ce

Please sign in to comment.