YouTube live immediata: relay sempre attivo e attivazione broadcast.

Il relay parte dal job overlay ogni 2s; scheduledStartTime ~90s invece di 5 min;
transition testing/live quando l'ingest RTMP raggiunge YouTube.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-04 08:19:20 +02:00
parent 2ccbfea75e
commit 2c5f4f82eb
6 changed files with 51 additions and 5 deletions

View File

@@ -4,10 +4,10 @@ RSpec.describe Youtube::BroadcastService do
describe "#normalize_scheduled_start_time" do
subject(:service) { described_class.allocate }
it "usa tra 5 minuti se scheduled_at è assente" do
it "usa tra ~90 secondi se scheduled_at è assente" do
travel_to Time.zone.parse("2026-06-03 20:00:00 UTC") do
t = service.send(:normalize_scheduled_start_time, nil)
expect(t).to eq(Time.utc(2026, 6, 3, 20, 5, 0))
expect(t).to eq(Time.utc(2026, 6, 3, 20, 1, 30))
end
end
@@ -15,7 +15,7 @@ RSpec.describe Youtube::BroadcastService do
travel_to Time.zone.parse("2026-06-03 20:00:00 UTC") do
past = Time.zone.parse("2026-06-03 10:00:00")
t = service.send(:normalize_scheduled_start_time, past)
expect(t).to eq(Time.utc(2026, 6, 3, 20, 5, 0))
expect(t).to eq(Time.utc(2026, 6, 3, 20, 1, 30))
end
end