## Changes
- Follows no longer override domain blocks, a domain block is final
+- Deletes are now the lowest priority to publish and will be handled after creates
## 2022.10
mute_expire: 5,
search_indexing: 10
],
- plugins: [Oban.Plugins.Pruner],
+ plugins: [
+ Oban.Plugins.Pruner,
+ {Oban.Plugins.Reindexer, schedule: "@weekly"}
+ ],
crontab: [
{"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
{"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
end
end
+ def run(["convert_id", id]) do
+ {:ok, uuid} = FlakeId.Ecto.Type.dump(id)
+ {:ok, raw_id} = Ecto.UUID.load(uuid)
+ shell_info(raw_id)
+ end
+
defp refetch_public_keys(query) do
query
|> Pleroma.Repo.chunk_stream(50, :batches)
end
if result == :ok do
- Notification.create_notifications(object)
-
# Only remove from index when deleting actual objects, not users or anything else
with %Pleroma.Object{} <- deleted_object do
Pleroma.Search.remove_from_index(deleted_object)
@impl true
def publish(%{data: %{"object" => object}} = activity) when is_map(object) or is_list(object) do
- PublisherWorker.enqueue("publish", %{
- "activity_id" => activity.id,
- "object_data" => Jason.encode!(object)
- })
+ PublisherWorker.enqueue(
+ "publish",
+ %{
+ "activity_id" => activity.id,
+ "object_data" => Jason.encode!(object)
+ },
+ priority: publish_priority(activity)
+ )
end
+ defp publish_priority(%{type: "Delete"}), do: 3
+ defp publish_priority(_), do: 0
+
# Job Worker Callbacks
@spec perform(atom(), module(), any()) :: {:ok, any()} | {:error, any()}
def get_notifications(user, params \\ %{}) do
options = cast_params(params)
- query =
- user
- |> Notification.for_user_query(options)
- |> restrict(:include_types, options)
- |> restrict(:exclude_types, options)
- |> restrict(:account_ap_id, options)
-
- IO.inspect(Pleroma.Repo.to_sql(:all, query))
-
- query
+ user
+ |> Notification.for_user_query(options)
+ |> restrict(:include_types, options)
+ |> restrict(:exclude_types, options)
+ |> restrict(:account_ap_id, options)
|> Pagination.fetch_paginated(params)
end