1
0
mirror of https://github.com/algora-io/tv.git synced 2024-11-26 01:00:20 +02:00

run upload worker sync instead of adding to queue

This commit is contained in:
zafer 2024-04-10 03:03:39 +03:00
parent a11de617a4
commit 2d60349466

View File

@ -268,9 +268,12 @@ defmodule AlgoraWeb.StudioLive do
video = Library.init_mp4!(entry, path, socket.assigns.current_user) video = Library.init_mp4!(entry, path, socket.assigns.current_user)
send(self(), {Library, %Library.Events.ProcessingQueued{video: video}}) send(self(), {Library, %Library.Events.ProcessingQueued{video: video}})
%{video_id: video.id} # TODO: add to oban queue instead
|> Workers.HLSTransmuxer.new() # ensure that the worker runs in the same machine where the upload is consumed
|> Oban.insert() # %{video_id: video.id}
# |> Workers.HLSTransmuxer.new()
# |> Oban.insert()
Library.transmux_to_hls(video, fn _ -> nil end)
{:ok, video} {:ok, video}
end) end)