aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user/synchronization_worker.ex
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-07-11 13:01:11 +0000
committerkaniini <ariadne@dereferenced.org>2019-07-11 13:01:11 +0000
commite4e3fd7e5552db274655d58bbbec1e4faabf7ccd (patch)
tree744524f1eac36a5c6d3b0cfb0aa121e920c86dbc /lib/pleroma/user/synchronization_worker.ex
parent6c491b2006ef2f279e6ffbb4ac007b7740c6d50d (diff)
parent59e16fc45a2fe1fa6bfeaecaa35f485b8a34bb6d (diff)
downloadpleroma-e4e3fd7e5552db274655d58bbbec1e4faabf7ccd.tar.gz
Merge branch 'fix/1019-refactor' into 'develop'
Fix/1019 refactor See merge request pleroma/pleroma!1397
Diffstat (limited to 'lib/pleroma/user/synchronization_worker.ex')
-rw-r--r--lib/pleroma/user/synchronization_worker.ex32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/pleroma/user/synchronization_worker.ex b/lib/pleroma/user/synchronization_worker.ex
deleted file mode 100644
index ba9cc3556..000000000
--- a/lib/pleroma/user/synchronization_worker.ex
+++ /dev/null
@@ -1,32 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
-# SPDX-License-Identifier: AGPL-3.0-onl
-
-defmodule Pleroma.User.SynchronizationWorker do
- use GenServer
-
- def start_link do
- config = Pleroma.Config.get([:instance, :external_user_synchronization])
-
- if config[:enabled] do
- GenServer.start_link(__MODULE__, interval: config[:interval])
- else
- :ignore
- end
- end
-
- def init(opts) do
- schedule_next(opts)
- {:ok, opts}
- end
-
- def handle_info(:sync_follow_counters, opts) do
- Pleroma.User.sync_follow_counter()
- schedule_next(opts)
- {:noreply, opts}
- end
-
- defp schedule_next(opts) do
- Process.send_after(self(), :sync_follow_counters, opts[:interval])
- end
-end