Skip to content

Commit

Permalink
Donated packages not stored with embed #1007
Browse files Browse the repository at this point in the history
  • Loading branch information
mellelieuwes committed Nov 19, 2024
1 parent ce21e7c commit 56fb3d4
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions core/systems/storage/_public.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ defmodule Systems.Storage.Public do
%Storage.EndpointModel{id: endpoint_id} = endpoint,
%{key: key, backend: backend, special: special},
data,
%{remote_ip: remote_ip, panel_info: %{embedded?: embedded?}} = meta_data
%{remote_ip: remote_ip} = meta_data
) do
packet_size = byte_size(data)

Expand All @@ -68,21 +68,15 @@ defmodule Systems.Storage.Public do
})
|> Repo.transaction()

if embedded? do
# submit data in current process
Logger.warn("[Storage.Public] deliver directly")
Storage.Delivery.deliver(backend, special, data, meta_data)
else
%{
endpoint_id: endpoint_id,
backend: backend,
special: special,
data: data,
meta_data: meta_data
}
|> Storage.Delivery.new()
|> Oban.insert()
end
%{
endpoint_id: endpoint_id,
backend: backend,
special: special,
data: data,
meta_data: meta_data
}
|> Storage.Delivery.new()
|> Oban.insert()
end

def list_files(endpoint) do
Expand Down

0 comments on commit 56fb3d4

Please sign in to comment.