1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-onl
5 defmodule Pleroma.User.SynchronizationWorker do
9 config = Pleroma.Config.get([:instance, :external_user_synchronization])
11 if config[:enabled] do
12 GenServer.start_link(__MODULE__, interval: config[:interval])
23 def handle_info(:sync_follow_counters, opts) do
24 Pleroma.User.sync_follow_counter()
29 defp schedule_next(opts) do
30 Process.send_after(self(), :sync_follow_counters, opts[:interval])