def stopServer(self): printAsLog("stopping NLP server") stopDaemon(self.pid_file, extra_pids_port=getConfig('nlp_server.port')) try: del self.nlp_server except Exception as e: print "error stopping NLP server\n%s" % e
def die(self): if hasattr(self, "daemonized") and self.daemonized: stopDaemon(self.pid_file) self.daemonized = False self.save() if hasattr(self, "task_channel"): print "also closing task_channel" self.task_channel.die()
def stopElasticsearch(self): printAsLog("stopping elasticsearch") self.stopCronJobs() p = Popen(['lsof', '-t', '-i:9200'], stdout=PIPE, close_fds=True) data = p.stdout.readline() while data: p_ = Popen(['kill', data.strip()]) p_.wait() data = p.stdout.readline() p.stdout.close() stopDaemon(self.els_pid_file) with open(self.els_status_file, 'wb+') as f: f.write("False")
def stopAnnexObserver(self): print "STOPPING OBSERVER" self.annex_observer.stop() self.annex_observer.join() stopDaemon(self.watcher_pid_file)
def stopRESTAPI(self): if DEBUG : print "shutting down REST API" stopDaemon(self.api_pid_file, extra_pids_port=API_PORT)
def stop(self): print "stopping xmpp server" stopDaemon(self.pid_file)
def stopRESTAPI(self): if DEBUG: print "shutting down REST API" stopDaemon(self.api_pid_file, extra_pids_port=API_PORT)
def stopWorker(self): printAsLog("WORKER EXHAUSTED. FINISHING!") stopDaemon(self.worker_pid_file)