mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-30 07:56:21 +08:00
fix: 修复 WebAgent 会话与选择状态 (#7266)
* fix(agent): preserve WebAgent session state * test: separate subscription pressure coordination and owner waits --------- Co-authored-by: jxxghp <jxxghp@gmail.com>
This commit is contained in:
@@ -345,6 +345,8 @@ class _ScaleTorrentHelper:
|
||||
|
||||
# 线程同步最多等待 5 秒,避免验收异常时无限挂起。
|
||||
_SITE_PRESSURE_SYNC_TIMEOUT = 5.0
|
||||
# 执行方退出单独计时,故障注入可缩短收口等待而不影响请求竞争场景的建立。
|
||||
_SITE_PRESSURE_JOIN_TIMEOUT = 5.0
|
||||
|
||||
|
||||
class _ScaleSiteRequestBoundary:
|
||||
@@ -574,7 +576,7 @@ def _run_site_pressure_case(
|
||||
contention_observed = pressure_event.wait(timeout=_SITE_PRESSURE_SYNC_TIMEOUT)
|
||||
boundary.release_first.set()
|
||||
for thread in threads:
|
||||
thread.join(timeout=_SITE_PRESSURE_SYNC_TIMEOUT)
|
||||
thread.join(timeout=_SITE_PRESSURE_JOIN_TIMEOUT)
|
||||
owners_finished = all(not thread.is_alive() for thread in threads)
|
||||
|
||||
initial_deferrals = [
|
||||
|
||||
Reference in New Issue
Block a user