durable_rules 0.34.25 → 0.34.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/src/rules/net.c +7 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65a3b11e8993e80451ad1001ff1f0c9c31fd6805
4
- data.tar.gz: 4d436b5a56d8affe7c75e885f249be34b48311d0
3
+ metadata.gz: 240fc57baccb92e497e5f220881e131f086c9f02
4
+ data.tar.gz: b08818faad5060a0aef4508ae1a84b4db646633c
5
5
  SHA512:
6
- metadata.gz: df2fb88c7319a64326307b8637956ad7be52264bf5fa7f9c7ffa245adb454933078a4f15f3891f0348786bd0e4346aa5b887c1794b65e84989e90eedbba6ca12
7
- data.tar.gz: 7e0fdf192e0fef72bcbd2e60493a8930b46fc469e89b7355a651158b58c6e0381fc2ec67e138f459ec9bbc6caf0fcafb34ece69ec01cbec60c74c2a508d545e0
6
+ metadata.gz: 0cf652b12ccb66f545ead8ca3688b85079ff4bc34fbd7c6457fb70cbdfeef6c7576779948160ca716793ec0c0c26e67ed98a7c6a76936ffb785e789bf74f6364
7
+ data.tar.gz: bbe68fcdc572957b5f8bdd2623956f7f113bd0ac858504635fc24df6f797652f9d1fd220a04347c14c4221a42780a2e87b65d9585b6d124d47c0abeb90f94380
data/src/rules/net.c CHANGED
@@ -1033,11 +1033,13 @@ static unsigned int loadPeekActionCommand(ruleset *tree, binding *rulesBinding)
1033
1033
  " local packed_frames = {}\n"
1034
1034
  " local unwrap = true\n"
1035
1035
  " local count = 1\n"
1036
+ " local left = false\n"
1036
1037
  " if raw_count ~= \"single\" then\n"
1037
1038
  " count = tonumber(raw_count)\n"
1038
1039
  " unwrap = false\n"
1039
1040
  " end\n"
1040
1041
  " if count == 0 then\n"
1042
+ " left = true\n"
1041
1043
  " local packed_frame = redis.call(\"lpop\", rule_action_key)\n"
1042
1044
  " while packed_frame ~= \"0\" do\n"
1043
1045
  " local frame = review_frame(cmsgpack.unpack(packed_frame), rule_action_key, sid, max_score)\n"
@@ -1066,7 +1068,11 @@ static unsigned int loadPeekActionCommand(ruleset *tree, binding *rulesBinding)
1066
1068
  " end\n"
1067
1069
  " end\n"
1068
1070
  " for i = #packed_frames, 1, -1 do\n"
1069
- " redis.call(\"lpush\", rule_action_key, packed_frames[i])\n"
1071
+ " if left then\n"
1072
+ " redis.call(\"lpush\", rule_action_key, packed_frames[i])\n"
1073
+ " else\n"
1074
+ " redis.call(\"rpush\", rule_action_key, packed_frames[i])\n"
1075
+ " end\n"
1070
1076
  " end\n"
1071
1077
  " if #packed_frames == 0 then\n"
1072
1078
  " return nil, nil\n"
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.25
4
+ version: 0.34.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesus Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake