diff --git a/lib/ewalrus.ex b/lib/ewalrus.ex index 0d2f475..9cd591b 100644 --- a/lib/ewalrus.ex +++ b/lib/ewalrus.ex @@ -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 @@ -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 ] diff --git a/lib/ewalrus/db_supervisor.ex b/lib/ewalrus/db_supervisor.ex index f703854..0cd44f6 100644 --- a/lib/ewalrus/db_supervisor.ex +++ b/lib/ewalrus/db_supervisor.ex @@ -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