语法: exiting = ngx.worker.exiting()
环境: set_by_lua, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*, ngx.timer., init_by_lua, init_worker_by_lua**
该函数返回一个布尔值,表示目前 Nginx 的工作进程是否已经开始退出。Nginx的工作进程退出,发生在 Nginx 服务退出或配置重载(又名HUP重载)。
该 API 在 v0.6.0
版本首次引入。
English source:
syntax: exiting = ngx.worker.exiting()
context: set_by_lua, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*, ngx.timer., init_by_lua, init_worker_by_lua**
This function returns a boolean value indicating whether the current Nginx worker process already starts exiting. Nginx worker process exiting happens on Nginx server quit or configuration reload (aka HUP reload).
This API was first introduced in the 0.9.3
release.