Mantiene la copertina YouTube se il telefono cade e avvia ffmpeg sul nodo, non via SSH.
Il relay HLS→RTMPS resta sul worker/agent del nodo assegnato, così tre dirette contemporanee restano in onda sul sito e sul canale della società senza schermo nero. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,13 +4,13 @@ require "rails_helper"
|
||||
|
||||
RSpec.describe YoutubeRelayStopJob, type: :job do
|
||||
it "requeues when stop runs on the wrong host" do
|
||||
session = instance_double(StreamSession, id: SecureRandom.uuid)
|
||||
session = instance_double(StreamSession, id: SecureRandom.uuid, stream_node: nil)
|
||||
allow(StreamSession).to receive(:find_by).and_return(session)
|
||||
allow(Streams::YoutubeRelay).to receive(:worker?).and_return(true)
|
||||
allow(Streams::YoutubeRelay).to receive(:stop_on_worker!).and_return(:wrong_host)
|
||||
|
||||
job_proxy = double("ConfiguredJob")
|
||||
expect(described_class).to receive(:set).with(wait: 2.seconds).and_return(job_proxy)
|
||||
expect(described_class).to receive(:set).with(wait: 2.seconds, queue: "youtube_relay_home").and_return(job_proxy)
|
||||
expect(job_proxy).to receive(:perform_later).with(session.id, 1)
|
||||
|
||||
described_class.new.perform(session.id, 0)
|
||||
|
||||
Reference in New Issue
Block a user