Skip to content

Commit 43aeb2d

Browse files
Update oban library (#165)
Co-authored-by: Lucas De Yarza <[email protected]>
1 parent 1b3ffb5 commit 43aeb2d

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

config/test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ config :libcluster,
2828
]
2929
]
3030

31-
config :postoffice, Oban, crontab: false, queues: false, plugins: false
31+
config :postoffice, Oban, crontab: false, testing: :manual

mix.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ defmodule Postoffice.MixProject do
5656
{:phoenix_pubsub, "~> 2.1"},
5757
{:phoenix_ecto, "~> 4.4"},
5858
{:ecto_sql, "~> 3.7.0"},
59-
{:postgrex, ">= 0.15.0"},
59+
{:postgrex, ">= 0.16.0"},
6060
{:phoenix_html, "~> 3.2.0"},
6161
{:phoenix_live_view, "~> 0.18"},
6262
{:phoenix_live_dashboard, "~> 0.7"},
6363
{:phoenix_live_reload, "~> 1.4", only: :dev},
6464
{:gettext, "~> 0.20.0"},
6565
{:jason, "~> 1.4"},
66-
{:plug_cowboy, "~> 2.6"},
66+
{:plug_cowboy, "~> 2.5.2"},
6767
{:bcrypt_elixir, "~> 3.0"},
6868
{:google_api_pub_sub, "~> 0.36.0"},
69-
{:goth, "~> 1.2.0"},
69+
{:goth, "~> 1.3.1"},
7070
{:httpoison, "~> 1.8"},
7171
{:mox, "~> 1.0", only: :test},
7272
{:gen_stage, "~> 0.14"},
@@ -79,8 +79,8 @@ defmodule Postoffice.MixProject do
7979
{:hackney, "~> 1.18.1"},
8080
{:cachex, "~> 3.4"},
8181
{:number, "~> 1.0.3"},
82-
{:oban, "2.7.2"},
83-
{:prom_ex, "~> 1.4.1"},
82+
{:oban, "2.13.5"},
83+
{:prom_ex, "~> 1.7.1"},
8484
{:scrivener_ecto, "~> 2.7"}
8585
]
8686
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
defmodule Postoffice.Repo.Migrations.CreateObanPeers do
2+
use Ecto.Migration
3+
4+
def up, do: Oban.Migrations.up(version: 11)
5+
6+
def down, do: Oban.Migrations.down(version: 11)
7+
8+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
defmodule Postoffice.Repo.Migrations.SwapPrimaryObanIndexes do
2+
use Ecto.Migration
3+
4+
@disable_ddl_transaction true
5+
@disable_migration_lock true
6+
7+
def change do
8+
create_if_not_exists index(
9+
:oban_jobs,
10+
[:state, :queue, :priority, :scheduled_at, :id],
11+
concurrently: true,
12+
prefix: "public"
13+
)
14+
15+
drop_if_exists index(
16+
:oban_jobs,
17+
[:queue, :state, :priority, :scheduled_at, :id],
18+
concurrently: true,
19+
prefix: "public"
20+
)
21+
end
22+
end

0 commit comments

Comments
 (0)