codebee 0.1.56 → 0.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -138,6 +138,10 @@ class Browser:
138
138
  # 杀树(runner 同款);Windows 忽略
139
139
  except OSError as e:
140
140
  raise BrowserError("浏览器启动失败:%s" % e)
141
+ # 挂巢(beekeeper):服务死(含硬杀)自动化浏览器一起带走。接管老实例
142
+ # 的分支会把 self.proc 置 None,不受影响(那不是本进程起的,不能杀)。
143
+ from .. import beekeeper
144
+ beekeeper.adopt(self.proc)
141
145
  if not self._wait_ready(15.0):
142
146
  # Edge 对已有实例的 profile:新进程转交参数后秒退(stdout 会打
143
147
  # 「正在现有浏览器会话中打开」),调试端口是老实例自己的(甚至
@@ -125,6 +125,8 @@ def start_quick_tunnel(port: int, on_url) -> bool:
125
125
  except Exception:
126
126
  _QUICK_PROC = None
127
127
  return False
128
+ from . import beekeeper
129
+ beekeeper.adopt(_QUICK_PROC) # 挂巢:服务死(含硬杀)隧道一起带走,防孤儿 cloudflared
128
130
  import threading
129
131
 
130
132
  def _watch():