diff options
author | rinpatch <rinpatch@sdf.org> | 2020-09-10 19:17:15 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-09-10 19:17:15 +0000 |
commit | 6316350918d1f55167fa384d55f385ff2c93e6bb (patch) | |
tree | 00f09310b3ea61a545906060efa7baace0b8378e /test/support | |
parent | 0254696e30132f48e585154450aff87afb259e1d (diff) | |
parent | 82b56cdb9bc01dcf4dbd2ac0c06103af0900787d (diff) | |
download | pleroma-6316350918d1f55167fa384d55f385ff2c93e6bb.tar.gz pleroma-6316350918d1f55167fa384d55f385ff2c93e6bb.zip |
Merge branch 'oban-overuse' into 'develop'
Expired activities as scheduled jobs in Oban
See merge request pleroma/pleroma!2916
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/factory.ex | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index 486eda8da..2fdfabbc5 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -200,25 +200,6 @@ defmodule Pleroma.Factory do |> Map.merge(attrs) end - defp expiration_offset_by_minutes(attrs, minutes) do - scheduled_at = - NaiveDateTime.utc_now() - |> NaiveDateTime.add(:timer.minutes(minutes), :millisecond) - |> NaiveDateTime.truncate(:second) - - %Pleroma.ActivityExpiration{} - |> Map.merge(attrs) - |> Map.put(:scheduled_at, scheduled_at) - end - - def expiration_in_the_past_factory(attrs \\ %{}) do - expiration_offset_by_minutes(attrs, -60) - end - - def expiration_in_the_future_factory(attrs \\ %{}) do - expiration_offset_by_minutes(attrs, 61) - end - def article_activity_factory do article = insert(:article) |