Preserva drain/offline su home e genera slate offline nel cloud-init.

Evita che ensure_home_from_env! annulli il drain a ogni allocate, e prepara /slates/offline.mp4 sul nodo Cloud per create_path MediaMTX.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-10 12:29:23 +02:00
co-authored by Cursor
parent 559284f0b2
commit baac3a512b
3 changed files with 21 additions and 3 deletions
@@ -39,6 +39,16 @@ RSpec.describe Streams::NodeRegistry do
end
end
it "does not reset home drain/offline/error status on ensure" do
with_env(home_env) do
home = described_class.ensure_home_from_env!
home.update!(status: "draining")
expect(described_class.ensure_home_from_env!.status).to eq("draining")
expect { described_class.allocate! }.to raise_error(Streams::NodeRegistry::NoCapacityError)
end
end
it "allocates the least loaded ready node" do
with_env(home_env) do
home = described_class.ensure_home_from_env!