Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.11 KB

ngxworkerexiting.md

File metadata and controls

29 lines (15 loc) · 1.11 KB

ngx.worker.exiting

语法: 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:

ngx.worker.exiting

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.

Back to TOC