~loyalinfo/openerp-tools/trunk

« back to all changes in this revision

Viewing changes to openerp-runbot/openerprunbot/jobs/install_all.py

  • Committer: Christophe Simonis
  • Date: 2013-04-26 11:13:12 UTC
  • Revision ID: chs@openerp.com-20130426111312-13x1inxgd984x7wv
[FIX] runbot: kill server with SIGTERM then with SIGKILL after 3 seconds

Show diffs side-by-side

added added

removed removed

Lines of Context:
372
372
    def stop(self):
373
373
        log("Stopping job", id=self.job_id, branch=self.name)
374
374
        if self.running_server_pid:
375
 
            kill(self.running_server_pid)
 
375
            kill(self.running_server_pid, signal.SIGTERM)
 
376
            threading.Timer(3, kill, [self.running_server_pid, signal.SIGKILL]).start()
376
377
        if self.client_web_pid:
377
378
            kill(self.client_web_pid)
378
379
        subprocess.call(["psql","postgres","-c","select pg_terminate_backend(pid) from pg_stat_activity where datname in ('%s','%s')"%(self.db,self.db_all)])