mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-02 01:39:09 +00:00
19 lines
391 B
Elixir
19 lines
391 B
Elixir
|
defmodule Pleroma.Workers.NodeInfoFetcherWorker do
|
||
|
use Pleroma.Workers.WorkerHelper, queue: "nodeinfo_fetcher"
|
||
|
|
||
|
alias Oban.Job
|
||
|
alias Pleroma.Instances.Instance
|
||
|
|
||
|
@impl Oban.Worker
|
||
|
def perform(%Job{
|
||
|
args: %{"op" => "process", "source_url" => domain}
|
||
|
}) do
|
||
|
uri =
|
||
|
domain
|
||
|
|> URI.parse()
|
||
|
|> URI.merge("/")
|
||
|
|
||
|
Instance.update_metadata(uri)
|
||
|
end
|
||
|
end
|