mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-09 09:08:11 +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.monitor_pid = None
|
||||||
self.pusher_pid = None
|
self.pusher_pid = None
|
||||||
if start:
|
if start:
|
||||||
self.spawn_cluster()
|
self.start()
|
||||||
self.guard()
|
|
||||||
|
def start(self):
|
||||||
|
self.spawn_cluster()
|
||||||
|
self.guard()
|
||||||
|
|
||||||
def spawn_process(self, target, *args):
|
def spawn_process(self, target, *args):
|
||||||
# This is just for PyCharm to not crash. Ignore it.
|
# This is just for PyCharm to not crash. Ignore it.
|
||||||
|
|||||||
Reference in New Issue
Block a user