mirror of
https://github.com/jtomchak/akkoma.git
synced 2025-02-01 12:29:10 +01:00
11 lines
369 B
Elixir
11 lines
369 B
Elixir
|
defmodule Pleroma.Web.MediaProxy.Invalidation.Script do
|
||
|
@behaviour Pleroma.Web.MediaProxy.Invalidation
|
||
|
|
||
|
@impl Pleroma.Web.MediaProxy.Invalidation
|
||
|
def purge(urls, %{script_path: script_path} = options) do
|
||
|
script_args = List.wrap(Map.get(options, :script_args, []))
|
||
|
System.cmd(Path.expand(script_path), [urls] ++ script_args)
|
||
|
{:ok, "success"}
|
||
|
end
|
||
|
end
|