Skip to content

Commit 6602603

Browse files
chriskuehldoujiang24
authored andcommitted
doc: clarify ngx.timer.every callback argument conventions, #1409.
1 parent f991f3e commit 6602603

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8239,6 +8239,9 @@ Similar to the [ngx.timer.at](#ngxtimerat) API function, but
82398239
1. `delay` *cannot* be zero,
82408240
1. timer will be created every `delay` seconds until the current Nginx worker process starts exiting.
82418241

8242+
Like [ngx.timer.at](#ngxtimerat), the `callback` argument will be called
8243+
automatically with the arguments `premature`, `user_arg1`, `user_arg2`, etc.
8244+
82428245
When success, returns a "conditional true" value (but not a `true`). Otherwise, returns a "conditional false" value and a string describing the error.
82438246

82448247
This API also respect the [lua_max_pending_timers](#lua_max_pending_timers) and [lua_max_running_timers](#lua_max_running_timers).

doc/HttpLuaModule.wiki

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7051,6 +7051,9 @@ Similar to the [[#ngx.timer.at|ngx.timer.at]] API function, but
70517051
# <code>delay</code> ''cannot'' be zero,
70527052
# timer will be created every <code>delay</code> seconds until the current Nginx worker process starts exiting.
70537053
7054+
Like [[#ngx.timer.at|ngx.timer.at]], the <code>callback</code> argument will be called
7055+
automatically with the arguments <code>premature</code>, <code>user_arg1</code>, <code>user_arg2</code>, etc.
7056+
70547057
When success, returns a "conditional true" value (but not a <code>true</code>). Otherwise, returns a "conditional false" value and a string describing the error.
70557058
70567059
This API also respect the [[#lua_max_pending_timers|lua_max_pending_timers]] and [[#lua_max_running_timers|lua_max_running_timers]].

0 commit comments

Comments
 (0)