-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable estimation for non-postgres adapters
Without an estimate function or guessing the Reporter queries are compatible with SQLite and MySQL adapters.
- Loading branch information
Showing
11 changed files
with
71 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import Config | ||
|
||
config :oban_met, auto_start: false, reporter: [estimate_limit: 1000] | ||
config :logger, level: :warning | ||
|
||
config :oban_met, ecto_repos: [Oban.Pro.Repo] | ||
config :oban_met, auto_start: false, reporter: [estimate_limit: 1000] | ||
|
||
config :oban_met, Oban.Met.Repo, | ||
priv: "test/support/", | ||
priv: "test/support/postgres", | ||
url: System.get_env("DATABASE_URL") || "postgres://localhost:5432/oban_met_test", | ||
pool: Ecto.Adapters.SQL.Sandbox | ||
|
||
config :logger, level: :warning | ||
config :oban_met, Oban.Met.LiteRepo, | ||
database: "priv/oban.db", | ||
priv: "test/support/sqlite", | ||
stacktrace: true, | ||
temp_store: :memory | ||
|
||
config :oban_met, ecto_repos: [Oban.Met.Repo, Oban.Met.LiteRepo] | ||
|
||
config :stream_data, max_runs: 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
defmodule Oban.Met.Repo do | ||
@moduledoc false | ||
|
||
use Ecto.Repo, otp_app: :oban_met, adapter: Ecto.Adapters.Postgres | ||
end | ||
|
||
defmodule Oban.Met.LiteRepo do | ||
@moduledoc false | ||
|
||
use Ecto.Repo, otp_app: :oban_met, adapter: Ecto.Adapters.SQLite3 | ||
end |
6 changes: 6 additions & 0 deletions
6
test/support/sqlite/migrations/20241219194515_add_oban_jobs_table.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
defmodule Oban.Met.LiteRepo.Migrations.AddObanJobsTable do | ||
use Ecto.Migration | ||
|
||
defdelegate up, to: Oban.Migration | ||
defdelegate down, to: Oban.Migration | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Oban.Met.Repo.start_link() | ||
Oban.Met.LiteRepo.start_link() | ||
ExUnit.start() | ||
Ecto.Adapters.SQL.Sandbox.mode(Oban.Met.Repo, :manual) |