Skip to content

Commit

Permalink
applay chobits suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw authored and dndx committed Oct 16, 2024
1 parent d25167b commit b3ebbdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kong/clustering/services/sync/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function _M:init_worker()
return
end

assert(self.rpc:sync_once(0))
assert(self.rpc:sync_once())
end))
end

Expand Down
3 changes: 2 additions & 1 deletion kong/clustering/services/sync/rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function _M:init_cp(manager)
for namespace, v in pairs(current_versions) do
if namespace == "default" then
default_namespace = v
break
end
end

Expand Down Expand Up @@ -150,7 +151,7 @@ function _M:init_dp(manager)
-- Params: new_versions: list of namespaces and their new versions, like:
-- { { namespace = "default", new_version = 1000, }, }
manager.callbacks:register("kong.sync.v2.notify_new_version", function(node_id, new_versions)
-- currently only default is supported, and anything else is ignored
-- TODO: currently only default is supported, and anything else is ignored
for namespace, new_version in pairs(new_versions) do
if namespace == "default" then
local version = new_version.new_version
Expand Down

0 comments on commit b3ebbdf

Please sign in to comment.