From 1168ba86f6ba2a9dcb6ad95e26115de05b91f005 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 7 May 2020 22:03:10 -0400 Subject: [PATCH] move IP/FP updaters to web namespace --- lib/philomena/application.ex | 6 +++--- lib/philomena_web/plugs/reload_user_plug.ex | 4 ++-- .../servers => philomena_web}/user_fingerprint_updater.ex | 6 +++--- lib/{philomena/servers => philomena_web}/user_ip_updater.ex | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) rename lib/{philomena/servers => philomena_web}/user_fingerprint_updater.ex (88%) rename lib/{philomena/servers => philomena_web}/user_ip_updater.ex (89%) diff --git a/lib/philomena/application.ex b/lib/philomena/application.ex index a2725036..88905484 100644 --- a/lib/philomena/application.ex +++ b/lib/philomena/application.ex @@ -17,16 +17,16 @@ defmodule Philomena.Application do Philomena.Servers.UserLinkUpdater, Philomena.Servers.PicartoChannelUpdater, Philomena.Servers.PiczelChannelUpdater, - Philomena.Servers.UserFingerprintUpdater, - Philomena.Servers.UserIpUpdater, Philomena.Servers.Config, {Pow.Store.Backend.MnesiaCache, extra_db_nodes: Node.list()}, {Redix, name: :redix, host: Application.get_env(:philomena, :redis_host)}, {Phoenix.PubSub, [name: Philomena.PubSub, adapter: Phoenix.PubSub.PG2]}, # Start the endpoint when the application starts - PhilomenaWeb.Endpoint, PhilomenaWeb.StatsUpdater, + PhilomenaWeb.UserFingerprintUpdater, + PhilomenaWeb.UserIpUpdater, + PhilomenaWeb.Endpoint, # Connection drainer for SIGTERM {RanchConnectionDrainer, ranch_ref: PhilomenaWeb.Endpoint.HTTP, shutdown: 30_000} diff --git a/lib/philomena_web/plugs/reload_user_plug.ex b/lib/philomena_web/plugs/reload_user_plug.ex index 355410c6..3efb7d2d 100644 --- a/lib/philomena_web/plugs/reload_user_plug.ex +++ b/lib/philomena_web/plugs/reload_user_plug.ex @@ -3,8 +3,8 @@ defmodule PhilomenaWeb.ReloadUserPlug do alias Pow.Plug alias Philomena.Users - alias Philomena.Servers.UserIpUpdater - alias Philomena.Servers.UserFingerprintUpdater + alias PhilomenaWeb.UserIpUpdater + alias PhilomenaWeb.UserFingerprintUpdater def init(opts), do: opts diff --git a/lib/philomena/servers/user_fingerprint_updater.ex b/lib/philomena_web/user_fingerprint_updater.ex similarity index 88% rename from lib/philomena/servers/user_fingerprint_updater.ex rename to lib/philomena_web/user_fingerprint_updater.ex index ed421b12..62e14270 100644 --- a/lib/philomena/servers/user_fingerprint_updater.ex +++ b/lib/philomena_web/user_fingerprint_updater.ex @@ -1,12 +1,12 @@ -defmodule Philomena.Servers.UserFingerprintUpdater do +defmodule PhilomenaWeb.UserFingerprintUpdater do alias Philomena.UserFingerprints.UserFingerprint alias Philomena.Repo import Ecto.Query def child_spec([]) do %{ - id: Philomena.Servers.UserFingerprintUpdater, - start: {Philomena.Servers.UserFingerprintUpdater, :start_link, [[]]} + id: PhilomenaWeb.UserFingerprintUpdater, + start: {PhilomenaWeb.UserFingerprintUpdater, :start_link, [[]]} } end diff --git a/lib/philomena/servers/user_ip_updater.ex b/lib/philomena_web/user_ip_updater.ex similarity index 89% rename from lib/philomena/servers/user_ip_updater.ex rename to lib/philomena_web/user_ip_updater.ex index e8ea2889..393a6ebc 100644 --- a/lib/philomena/servers/user_ip_updater.ex +++ b/lib/philomena_web/user_ip_updater.ex @@ -1,12 +1,12 @@ -defmodule Philomena.Servers.UserIpUpdater do +defmodule PhilomenaWeb.UserIpUpdater do alias Philomena.UserIps.UserIp alias Philomena.Repo import Ecto.Query def child_spec([]) do %{ - id: Philomena.Servers.UserIpUpdater, - start: {Philomena.Servers.UserIpUpdater, :start_link, [[]]} + id: PhilomenaWeb.UserIpUpdater, + start: {PhilomenaWeb.UserIpUpdater, :start_link, [[]]} } end