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
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:
parent
bc2f1e940e
commit
43a8f3fee9
1 changed files with 3 additions and 2 deletions
|
@ -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 ->
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue