You've already forked directdnsonly
feat: add initial_delay_minutes to reconciler for LB stagger 🕐
Configurable startup delay before the first reconciliation pass so that multiple receivers behind a load balancer can be offset without relying on container start order (which is lost on reboot). Set to half the interval on the secondary receiver — e.g. interval 60m → delay 30m. Default is 0 (no change to existing behaviour). Stop event is respected during the delay so the worker shuts down cleanly even mid-wait.
This commit is contained in:
@@ -175,6 +175,17 @@ def test_no_servers_does_not_start(delete_queue):
|
||||
assert not w.is_alive
|
||||
|
||||
|
||||
def test_initial_delay_stored(delete_queue):
|
||||
cfg = {**BASE_CONFIG, "initial_delay_minutes": 30}
|
||||
w = ReconciliationWorker(delete_queue, cfg)
|
||||
assert w._initial_delay == 30 * 60
|
||||
|
||||
|
||||
def test_zero_initial_delay_by_default(delete_queue):
|
||||
w = ReconciliationWorker(delete_queue, BASE_CONFIG)
|
||||
assert w._initial_delay == 0
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _heal_backends — Option C backend healing
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user