mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-05 13:18:13 +08:00
Make processes identifiable with uuid4 (#91)
* make processes identifiable * update docs
This commit is contained in:
+2
-1
@@ -69,6 +69,7 @@ class Cluster:
|
||||
self.start_event = Event()
|
||||
self.sentinel = Process(
|
||||
target=Sentinel,
|
||||
name=f"Process-{uuid.uuid4().hex}",
|
||||
args=(
|
||||
self.stop_event,
|
||||
self.start_event,
|
||||
@@ -196,7 +197,7 @@ class Sentinel:
|
||||
"""
|
||||
:type target: function or class
|
||||
"""
|
||||
p = Process(target=target, args=args)
|
||||
p = Process(target=target, args=args, name=f"Process-{uuid.uuid4().hex}")
|
||||
p.daemon = True
|
||||
if target == worker:
|
||||
p.daemon = Conf.DAEMONIZE_WORKERS
|
||||
|
||||
Reference in New Issue
Block a user