La setup broadcast YouTube (~23s) passa in background job; l'API risponde subito. Aumentato anche il timeout Dio mobile per createSession YouTube. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
366 B
Ruby
13 lines
366 B
Ruby
class YoutubeBroadcastSetupJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
retry_on Youtube::SetupBroadcast::Error, wait: 10.seconds, attempts: 3
|
|
|
|
def perform(session_id, youtube_channel = nil)
|
|
session = StreamSession.find_by(id: session_id)
|
|
return unless session
|
|
|
|
Youtube::SetupBroadcast.call(session, youtube_channel: youtube_channel.presence)
|
|
end
|
|
end
|