modify: 重启失败bug
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ requires = ["hatchling"]
|
||||
|
||||
[project]
|
||||
name = "chongming-worker"
|
||||
version = "0.4.3"
|
||||
version = "0.4.4"
|
||||
description = "chongming worker"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
@@ -997,6 +997,9 @@ async def _managed_worker(
|
||||
"""
|
||||
while True:
|
||||
controller.exit_request = ""
|
||||
# control_event 为槽位级共享事件:上次 config_set/restart 置位后若不清除,
|
||||
# 本次重建的副本会立即唤醒 exit_event.wait() 并以 stop 退出,导致副本数 -1。
|
||||
controller.control_event.clear()
|
||||
controller.current_worker_id = controller.make_worker_id()
|
||||
controller.reload_cb = reload_cb
|
||||
# 若存在待应用的新配置(config_set 设置),本次重建使用新配置运行
|
||||
|
||||
Reference in New Issue
Block a user