Upstream sync

This commit is contained in:
Senad Uka
2020-07-01 06:39:02 +02:00
parent dd0ac5b110
commit e49498bbbf
65 changed files with 1657 additions and 74 deletions

View File

@@ -60,9 +60,14 @@ class StreamNotificationsController < ApplicationController
def set_broadcast
if notification_type == "video.asset.static_renditions.ready"
live_stream_id = notification.dig(:stream_notification, :data, :live_stream_id)
@broadcast = Broadcast.find_by!(stream_uid: live_stream_id)
@broadcast = Broadcast.find_by(stream_uid: live_stream_id)
else
@broadcast = Broadcast.find_by!(stream_uid: notification_object_id)
@broadcast = Broadcast.find_by(stream_uid: notification_object_id)
end
if @broadcast.nil?
logger.info "Ignoring broadcast from other environment. Type = #{notification_type}. Id = #{live_stream_id} / #{notification_object_id}"
head :ok
end
end