Ensure we only expire Create activities with the Mix task
This commit is contained in:
parent
2e7c5fe2de
commit
cf4c97242b
@ -136,6 +136,7 @@ defmodule Mix.Tasks.Pleroma.Database do
|
|||||||
|> join(:left, [a], u in assoc(a, :expiration))
|
|> join(:left, [a], u in assoc(a, :expiration))
|
||||||
|> where(local: true)
|
|> where(local: true)
|
||||||
|> where([a, u], is_nil(u))
|
|> where([a, u], is_nil(u))
|
||||||
|
|> where([a], fragment("(? ->> 'type'::text) = 'Create'", a.data))
|
||||||
|> Pleroma.RepoStreamer.chunk_stream(100)
|
|> Pleroma.RepoStreamer.chunk_stream(100)
|
||||||
|> Stream.each(fn activities ->
|
|> Stream.each(fn activities ->
|
||||||
Enum.each(activities, fn activity ->
|
Enum.each(activities, fn activity ->
|
||||||
|
Loading…
Reference in New Issue
Block a user