durable_rules 0.34.56 → 0.34.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/rules/events.c +1 -1
- data/src/rules/net.c +8 -4
- data/src/rules/net.h +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498fdfaaecffebdf986536f05cdf517d8e1388f1
|
4
|
+
data.tar.gz: 2eaf9c77fa2b171c8263d9eb408aaf434b211d10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1677ae9c1459c7dd6310aa7c26502af432ddc2e69b5a8254541d7c633f7694a2f7df1459d53813ba4049a3e0a59f49a68da9515f4a5e85f5dd2d976b542175c2
|
7
|
+
data.tar.gz: 32eef26b4e7d94155664a9d85d2e217cd446fb9abb52a7b43940783b90a16ba367575cef1be028f71f024ffcc353f05202450797b91a10e48e52a09c764d0763
|
data/src/rules/events.c
CHANGED
@@ -2081,7 +2081,7 @@ unsigned int cancelTimer(unsigned int handle, char *sid, char *timerName) {
|
|
2081
2081
|
return result;
|
2082
2082
|
}
|
2083
2083
|
|
2084
|
-
return removeTimer(rulesBinding, timerName);
|
2084
|
+
return removeTimer(rulesBinding, sid, timerName);
|
2085
2085
|
}
|
2086
2086
|
|
2087
2087
|
unsigned int renewActionLease(unsigned int handle, char *sid) {
|
data/src/rules/net.c
CHANGED
@@ -533,11 +533,14 @@ static unsigned int loadRemoveTimerCommand(ruleset *tree, binding *rulesBinding)
|
|
533
533
|
char *lua = NULL;
|
534
534
|
if (asprintf(&lua,
|
535
535
|
"local timer_key = \"%s!t\"\n"
|
536
|
-
"local
|
536
|
+
"local sid = ARGV[1]\n"
|
537
|
+
"local timer_name = ARGV[2]\n"
|
537
538
|
"local res = redis.call(\"zrange\", timer_key, 0, -1)\n"
|
538
539
|
"for i = 1, #res, 1 do\n"
|
539
540
|
" if string.find(res[i], \"\\\"%%$t\\\"%%s*:%%s*\\\"\" .. timer_name .. \"\\\"\") then\n"
|
540
|
-
"
|
541
|
+
" if string.find(res[i], \"\\\"sid\\\"%%s*:%%s*\\\"\" .. sid .. \"\\\"\") then\n"
|
542
|
+
" redis.call(\"zrem\", timer_key, res[i])\n"
|
543
|
+
" end\n"
|
541
544
|
" end\n"
|
542
545
|
"end\n"
|
543
546
|
"return 0\n", name) == -1) {
|
@@ -3124,12 +3127,13 @@ unsigned int registerTimer(void *rulesBinding, unsigned int duration, char asser
|
|
3124
3127
|
return RULES_OK;
|
3125
3128
|
}
|
3126
3129
|
|
3127
|
-
unsigned int removeTimer(void *rulesBinding, char *timerName) {
|
3130
|
+
unsigned int removeTimer(void *rulesBinding, char *sid, char *timerName) {
|
3128
3131
|
binding *currentBinding = (binding*)rulesBinding;
|
3129
3132
|
redisContext *reContext = currentBinding->reContext;
|
3130
3133
|
int result = redisAppendCommand(reContext,
|
3131
|
-
"evalsha %s 0 %s",
|
3134
|
+
"evalsha %s 0 %s %s",
|
3132
3135
|
currentBinding->removeTimerHash,
|
3136
|
+
sid,
|
3133
3137
|
timerName);
|
3134
3138
|
VERIFY(result, "removeTimer");
|
3135
3139
|
return RULES_OK;
|
data/src/rules/net.h
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: durable_rules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.34.
|
4
|
+
version: 0.34.57
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesus Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|