fix expiry
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful

This commit is contained in:
Floatingghost 2025-05-14 12:07:59 +01:00
parent bc2f1e940e
commit 43a8f3fee9

View file

@ -565,8 +565,9 @@ def run(["backfill_expiry", username]) do
|> Stream.with_index()
|> Stream.each(fn {posts, index} ->
# use index to determine the offset
next_expiry = DateTime.utc_now() |> DateTime.add(ttl * 24 * 60 * 60 + index * 60, :second)
offset = index * 60 * 10
days_offset = ttl * 24 * 60 * 60
next_expiry = DateTime.utc_now() |> DateTime.add(days_offset + offset, :second)
posts
|> Enum.each(fn post ->