bzp2010 commented on code in PR #13904:
URL: https://github.com/apache/apisix/pull/13904#discussion_r3911936401
##########
apisix/admin/standalone.lua:
##########
@@ -64,19 +120,105 @@ local function update_and_broadcast_config(apisix_yaml)
if shared_dict then
-- the worker that handles Admin API calls is responsible for writing
the shared dict
- local ok, err = shared_dict:set("config", raw)
+ local stored = encode_config(apisix_yaml[METADATA_DIGEST], raw)
+ local ok, err = shared_dict:set("config", stored)
if not ok then
return nil, "failed to save config to shared dict: " .. err
end
core.log.info("standalone config updated: ", raw)
else
core.log.crit(config_yaml.ERR_NO_SHARED_DICT)
end
- return events:post(EVENT_UPDATE, EVENT_UPDATE)
+ return true
end
local validate_configuration = config_validate.validate_configuration
+
+local MAX_WAIT_MS = 60000
+local POLL_INTERVAL = 0.05
+
+
+local function parse_wait_ms(ctx)
+ local args = core.request.get_uri_args(ctx)
+ local wait = args and tonumber(args.wait)
Review Comment:
...Do you really understand Lua, or are you just speaking based on that
ridiculous LLM hallucinations?
```lua
print(tonumber(nil)) -- nil
print(tonumber(true)) -- nil
print(tonumber({a=1,b=2})) -- nil
print(tonumber("1")) -- 1
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]