Example #1
0
 def process_signals(self):
     while len(self.queue):
         sig = self.queue.pop(0)
         if sig in [signal.SIGINT, signal.SIGTERM]:
             raise KeyboardInterrupt
         elif sig == signal.SIGHUP:
             # restart on kill -HUP
             odoo.phoenix = True
             raise KeyboardInterrupt
         elif sig == signal.SIGQUIT:
             # dump stacks on kill -3
             self.dumpstacks()
         elif sig == signal.SIGUSR1:
             # log ormcache stats on kill -SIGUSR1
             log_ormcache_stats()
         elif sig == signal.SIGTTIN:
             # increase number of workers
             self.population += 1
         elif sig == signal.SIGTTOU:
             # decrease number of workers
             self.population -= 1
Example #2
0
File: server.py Project: befks/odoo
 def process_signals(self):
     while len(self.queue):
         sig = self.queue.pop(0)
         if sig in [signal.SIGINT, signal.SIGTERM]:
             raise KeyboardInterrupt
         elif sig == signal.SIGHUP:
             # restart on kill -HUP
             odoo.phoenix = True
             raise KeyboardInterrupt
         elif sig == signal.SIGQUIT:
             # dump stacks on kill -3
             self.dumpstacks()
         elif sig == signal.SIGUSR1:
             # log ormcache stats on kill -SIGUSR1
             log_ormcache_stats()
         elif sig == signal.SIGTTIN:
             # increase number of workers
             self.population += 1
         elif sig == signal.SIGTTOU:
             # decrease number of workers
             self.population -= 1