Skip to content

Commit

Permalink
fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dndx authored and bungle committed Feb 23, 2022
1 parent cc4f480 commit 65f67d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions kong/clustering/data_plane.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ local function send_ping(c, log_suffix)

local hash = declarative.get_current_hash()

if hash == true then
hash = DECLARATIVE_EMPTY_CONFIG_HASH
end

local _, err = c:send_ping(hash)
if err then
ngx_log(is_timeout(err) and ngx_NOTICE or ngx_WARN, _log_prefix,
Expand Down
7 changes: 0 additions & 7 deletions kong/db/declarative/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ local PREFIX = ngx.config.prefix()
local SUBSYS = ngx.config.subsystem
local DECLARATIVE_HASH_KEY = constants.DECLARATIVE_HASH_KEY
local DECLARATIVE_EMPTY_CONFIG_HASH = constants.DECLARATIVE_EMPTY_CONFIG_HASH
local DECLARATIVE_LOCK_KEY = "declarative:lock"
local DECLARATIVE_LOCK_TTL = 60
local GLOBAL_QUERY_OPTS = { nulls = true, workspace = null }


Expand Down Expand Up @@ -851,11 +849,6 @@ function declarative.load_into_cache(entities, meta, hash)
end

t:set("tags||@list", tags)

hash, err = marshall(hash)
if not hash then
return nil, err
end
t:set(DECLARATIVE_HASH_KEY, hash)

kong.default_workspace = default_workspace
Expand Down

0 comments on commit 65f67d4

Please sign in to comment.