mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-16 14:05:10 +00:00
fix(serve): defer service hot reload while a remote session uses it
Remote-only serve no longer builds the download queue manager just to read busy services.
This commit is contained in:
@@ -111,6 +111,19 @@ def test_get_download_manager_returns_singleton() -> None:
|
||||
assert a is b
|
||||
|
||||
|
||||
async def test_busy_services_counts_a_live_remote_session() -> None:
|
||||
from unshackle.core.api.download_manager import busy_services
|
||||
from unshackle.core.api.session_store import get_session_store
|
||||
|
||||
store = get_session_store()
|
||||
session = await store.create("EXAMPLE", object(), session_id="busy-session")
|
||||
try:
|
||||
assert "EXAMPLE" in busy_services()
|
||||
finally:
|
||||
await store.delete(session.session_id)
|
||||
assert "EXAMPLE" not in busy_services()
|
||||
|
||||
|
||||
def test_job_status_values() -> None:
|
||||
assert {s.value for s in JobStatus} == {
|
||||
"queued",
|
||||
|
||||
Reference in New Issue
Block a user