mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-27 09:08:13 +08:00
Sentinel now has a start() function. Will still autostart on init, but can be overriden with start=False
This commit is contained in:
+5
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user