lua-nginx-module icon indicating copy to clipboard operation
lua-nginx-module copied to clipboard

feature: add ngx_http_lua_ffi_worker_pids to get all workers pid map

Open oowl opened this issue 1 year ago • 4 comments

I hereby granted the copyright of the changes in this pull request to the authors of this lua-nginx-module project.

oowl avatar Aug 11 '22 16:08 oowl

The ci is still failing. Please modify the .travis.yml, change the lua-resty-core to your repo and the related branch

zhuizhuhaomeng avatar Aug 12 '22 23:08 zhuizhuhaomeng

CI is still failed. See https://app.travis-ci.com/github/openresty/lua-nginx-module/jobs/580097060

https://github.com/openresty/lua-nginx-module#data-sharing-within-an-nginx-worker You need to add examples to the doc like the above link.

zhuizhuhaomeng avatar Aug 18 '22 01:08 zhuizhuhaomeng

@zhuizhuhaomeng I think this is a worker API, you can use this API to know all Nginx worker PID, just an API, not a big function impl, It is not in one level with a big module(eg: ngx_http_lua_shdict), in order to this small API to write a long doc is dirty? And this doc will include some API that is not included by Openresty.

oowl avatar Aug 18 '22 17:08 oowl

It seems that ci failure is not related to my change.

oowl avatar Aug 18 '22 17:08 oowl

merge with the following patch

diff --git a/t/062-count.t b/t/062-count.t
index d524da47..ad464ba2 100644
--- a/t/062-count.t
+++ b/t/062-count.t
@@ -438,7 +438,7 @@ thread: 3
 --- request
 GET /test
 --- response_body
-worker: 4
+worker: 5
 --- no_error_log
 [error]

zhuizhuhaomeng avatar Aug 21 '22 14:08 zhuizhuhaomeng