Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7b5f4b17
Commit
7b5f4b17
authored
Dec 03, 2019
by
antirez
Browse files
Modules: create timers in contexts without a client.
parent
89849c8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
7b5f4b17
...
...
@@ -5150,7 +5150,7 @@ RedisModuleTimerID RM_CreateTimer(RedisModuleCtx *ctx, mstime_t period, RedisMod
timer
->
module
=
ctx
->
module
;
timer
->
callback
=
callback
;
timer
->
data
=
data
;
timer
->
dbid
=
ctx
->
client
->
db
->
id
;
timer
->
dbid
=
ctx
->
client
?
ctx
->
client
->
db
->
id
:
0
;
uint64_t
expiretime
=
ustime
()
+
period
*
1000
;
uint64_t
key
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment