diff --git a/config/config.exs b/config/config.exs index 70e446dfb..3704be0ed 100644 --- a/config/config.exs +++ b/config/config.exs @@ -307,7 +307,7 @@ config :mobilizon, Oban, crontab: [ {"@hourly", Mobilizon.Service.Workers.BuildSiteMap, queue: :background}, {"17 4 * * *", Mobilizon.Service.Workers.RefreshGroups, queue: :background}, - {"36 * * * *", Mobilizon.Service.Workers.RefreshInstances, queue: :background}, + {"36 3 * * *", Mobilizon.Service.Workers.RefreshInstances, queue: :background}, {"@hourly", Mobilizon.Service.Workers.CleanOrphanMediaWorker, queue: :background}, {"@hourly", Mobilizon.Service.Workers.CleanUnconfirmedUsersWorker, queue: :background}, {"@hourly", Mobilizon.Service.Workers.ExportCleanerWorker, queue: :background}, diff --git a/lib/federation/activity_pub/relay.ex b/lib/federation/activity_pub/relay.ex index 21d3909e5..acc5c6647 100644 --- a/lib/federation/activity_pub/relay.ex +++ b/lib/federation/activity_pub/relay.ex @@ -23,7 +23,13 @@ defmodule Mobilizon.Federation.ActivityPub.Relay do def init do # Wait for everything to settle. Process.sleep(1000 * 5) - get_actor() + relay = get_actor() + + unless Regex.match?(~r/BEGIN RSA PRIVATE KEY/, relay.keys) do + {:ok, relay} = Actors.actor_key_rotation(relay) + end + + relay end @spec get_actor() :: Actor.t() | no_return