Sentinel now has a start() function. Will still autostart on init, but can be overriden with start=False

This commit is contained in:
Ilan Steemers
2015-06-27 01:43:11 +02:00
parent 8dce0c5560
commit 3b7682411c
+5 -2
View File
@@ -169,8 +169,11 @@ class Sentinel(object):
self.monitor_pid = None
self.pusher_pid = None
if start:
self.spawn_cluster()
self.guard()
self.start()
def start(self):
self.spawn_cluster()
self.guard()
def spawn_process(self, target, *args):
# This is just for PyCharm to not crash. Ignore it.