Add profile custom fields to ActivityPub.UserView
[akkoma] / lib / pleroma / application.ex
index 8887e393536db2ef6a60bd8ee5c2ce979a40925a..00b06f723ab224bc5e86a8cf46f4ae546bb72c4e 100644 (file)
@@ -115,10 +115,6 @@ defmodule Pleroma.Application do
         %{
           id: Pleroma.ScheduledActivityWorker,
           start: {Pleroma.ScheduledActivityWorker, :start_link, []}
-        },
-        %{
-          id: Pleroma.QuantumScheduler,
-          start: {Pleroma.QuantumScheduler, :start_link, []}
         }
       ] ++
         hackney_pool_children() ++
@@ -144,6 +140,11 @@ defmodule Pleroma.Application do
             id: :federator_init,
             start: {Task, :start_link, [&Pleroma.Web.Federator.init/0]},
             restart: :temporary
+          },
+          %{
+            id: :internal_fetch_init,
+            start: {Task, :start_link, [&Pleroma.Web.ActivityPub.InternalFetchActor.init/0]},
+            restart: :temporary
           }
         ] ++
         streamer_child() ++
@@ -155,11 +156,7 @@ defmodule Pleroma.Application do
             start: {Pleroma.Web.Endpoint, :start_link, []},
             type: :supervisor
           },
-          %{id: Pleroma.Gopher.Server, start: {Pleroma.Gopher.Server, :start_link, []}},
-          %{
-            id: Pleroma.User.SynchronizationWorker,
-            start: {Pleroma.User.SynchronizationWorker, :start_link, []}
-          }
+          %{id: Pleroma.Gopher.Server, start: {Pleroma.Gopher.Server, :start_link, []}}
         ]
 
     # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
@@ -235,14 +232,12 @@ defmodule Pleroma.Application do
 
   defp after_supervisor_start do
     with digest_config <- Application.get_env(:pleroma, :email_notifications)[:digest],
-         true <- digest_config[:active],
-         %Crontab.CronExpression{} = schedule <-
-           Crontab.CronExpression.Parser.parse!(digest_config[:schedule]) do
-      Pleroma.QuantumScheduler.new_job()
-      |> Quantum.Job.set_name(:digest_emails)
-      |> Quantum.Job.set_schedule(schedule)
-      |> Quantum.Job.set_task(&Pleroma.DigestEmailWorker.run/0)
-      |> Pleroma.QuantumScheduler.add_job()
+         true <- digest_config[:active] do
+      PleromaJobQueue.schedule(
+        digest_config[:schedule],
+        :digest_emails,
+        Pleroma.DigestEmailWorker
+      )
     end
 
     :ok