We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82ee491 commit 7415f97Copy full SHA for 7415f97
mysql_ch_replicator/utils.py
@@ -45,11 +45,15 @@ def restart_dead_process_if_required(self):
45
logger.warning(f'Restarting stopped process: < {self.cmd} >')
46
self.run()
47
return
48
+
49
res = self.process.poll()
50
if res is None:
- # still running
51
+ # Process is running fine.
52
- logger.warning(f'Restarting dead process: < {self.cmd} >')
53
54
+ logger.warning(f'Process dead (exit code: {res}), restarting: < {self.cmd} >')
55
+ # Process has already terminated, just reap it
56
+ self.process.wait()
57
58
59
def stop(self):
0 commit comments