From ef762bb59e7ee34b46e84da4de035288c23f8f20 Mon Sep 17 00:00:00 2001 From: Chrono Date: Thu, 28 Nov 2024 16:02:34 +0800 Subject: [PATCH] refactor(clustering/sync): use CLUSTERING_PING_INTERVAL as sync delay (#13938) https://konghq.atlassian.net/browse/KAG-5919 --- kong/clustering/services/sync/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kong/clustering/services/sync/init.lua b/kong/clustering/services/sync/init.lua index 06802f6088db..b64699d34017 100644 --- a/kong/clustering/services/sync/init.lua +++ b/kong/clustering/services/sync/init.lua @@ -2,13 +2,14 @@ local _M = {} local _MT = { __index = _M, } +local constants = require("kong.constants") local events = require("kong.clustering.events") local strategy = require("kong.clustering.services.sync.strategies.postgres") local rpc = require("kong.clustering.services.sync.rpc") local FIRST_SYNC_DELAY = 0.2 -- seconds -local EACH_SYNC_DELAY = 30 -- seconds +local EACH_SYNC_DELAY = constants.CLUSTERING_PING_INTERVAL -- 30 seconds function _M.new(db, is_cp)