Skip to content

Commit

Permalink
possibility to set the polling interval
Browse files Browse the repository at this point in the history
  • Loading branch information
abc3 committed Mar 2, 2022
1 parent f8b8053 commit 17d206d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/ewalrus.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule Ewalrus do
db_name,
db_user,
db_pass,
poll_interval \\ 500,
publication \\ "supabase_multiplayer",
slot_name \\ "supabase_multiplayer_replication_slot"
) do
Expand All @@ -30,6 +31,7 @@ defmodule Ewalrus do
db_name: db_name,
db_user: db_user,
db_pass: db_pass,
poll_interval: poll_interval,
publication: publication,
slot_name: slot_name
]
Expand Down
2 changes: 1 addition & 1 deletion lib/ewalrus/db_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Ewalrus.DbSupervisor do
backoff_type: :rand_exp,
backoff_min: 100,
backoff_max: 120_000,
replication_poll_interval: 1000,
replication_poll_interval: args[:poll_interval],
publication: args[:publication],
slot_name: args[:slot_name],
max_record_bytes: 1_048_576
Expand Down

0 comments on commit 17d206d

Please sign in to comment.