def reload(self, log_file=None, dump_stack_trace=False):
print ('== RELOAD IS BUGGY ==')
pid = self.pid
if pid:
try:
int(pid) # "if pid is int". If not, an exception will be rised.
os.kill(pid, signal.SIGHUP)
time.sleep(5) # trochu hack, mozna by byl lepsi nejaky cyklus co kontroluje ukonceni daneho pidu, nebo tak neco
# POZOR NEFUNGUJE SPRAVNE, NESTIHNE SE UKONCIT A NOVY SE NESPUSTI
self.start(log_file=log_file, dump_stack_trace=dump_stack_trace)
except ValueError:
print("The content of the pidfile is invalid!")
print(pid)
else:
print ('Not Running')
评论列表
文章目录