durable_rules 0.34.40 → 0.34.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/librb/engine.rb +1 -1
  3. data/src/rules/net.c +3 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 786b66c234b675e0949412272e546bb250adf5e0
4
- data.tar.gz: 764679f787d59aa385057811889c8c69b7077951
3
+ metadata.gz: bc5c64d1f4baff031b896777cb6cf82dcceffa93
4
+ data.tar.gz: a6a2cdd3ea0baba83861f5eb68e96f2d18a87e2e
5
5
  SHA512:
6
- metadata.gz: 03706d8683452c21ebd9f48efc2427446ba5d2e68813ae9976eeaa2b96d1bb7fc4dd1d368c86aac95e2e29987eb86562700d35eb6d8555d110dd6ba9cebfdc08
7
- data.tar.gz: d312c57e840d2397f4e52331009845228faad429d87f22157a356f3f0de851f0fb35029614c459a3deaf955735f2e0c52f0979b336c1a41b074b4e08b7492d6e
6
+ metadata.gz: db9c9d536c8f1291d2374fadaa20002e9a957d10bc80a06b77b834c39341c11b7585ecb10823936492668f651c7defd6887dda17346618e4685a360fd28feaec
7
+ data.tar.gz: 9ec16e10659840043d32d59868739182be1c3b76d31e9eed8ef7022ef33c5379ea66eda06dafc437241a7f6058b2556b75acdc33cab6ad05210153e29ba5d296
data/librb/engine.rb CHANGED
@@ -1243,7 +1243,7 @@ module Engine
1243
1243
  if (Thread.current[:index] == (@ruleset_list.length-1)) & inner_wait
1244
1244
  Thread.current[:index] = (Thread.current[:index] + 1) % @ruleset_list.length
1245
1245
  Thread.current[:wait] = inner_wait
1246
- timer.after 0.25, &thread_lambda
1246
+ timer.after 0.01, &thread_lambda
1247
1247
  else
1248
1248
  Thread.current[:index] = (Thread.current[:index] + 1) % @ruleset_list.length
1249
1249
  Thread.current[:wait] = inner_wait
data/src/rules/net.c CHANGED
@@ -1060,6 +1060,7 @@ static unsigned int loadPeekActionCommand(ruleset *tree, binding *rulesBinding)
1060
1060
  " end\n"
1061
1061
  " end\n"
1062
1062
  " if cancel then\n"
1063
+ "redis.call(\"lpush\", \"debug3\", cjson.encode(frame))\n"
1063
1064
  " for i = 1, #frame, 1 do\n"
1064
1065
  " if type(frame[i]) == \"table\" then\n"
1065
1066
  " redis.call(\"hdel\", visited_key .. sid, frame[i][\"id\"])\n"
@@ -1735,7 +1736,6 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
1735
1736
  "local toggle\n"
1736
1737
  "local expressions_count\n"
1737
1738
  "local results\n"
1738
- "local unpacked_results\n"
1739
1739
  "local context\n"
1740
1740
  "local keys\n"
1741
1741
  "local reviewers\n"
@@ -1808,7 +1808,6 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
1808
1808
  "end\n"
1809
1809
  "local save_result = function(frame, index)\n"
1810
1810
  " table.insert(results, 1, frame_packers[index](frame, true))\n"
1811
- " table.insert(unpacked_results, 1, frame)\n"
1812
1811
  " for name, message in pairs(frame) do\n"
1813
1812
  " if message ~= \"$n\" and not message[\"$f\"] then\n"
1814
1813
  " redis.call(\"hdel\", events_hashset, message[\"id\"])\n"
@@ -1963,8 +1962,10 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
1963
1962
  " local frame = frame_unpackers[index - 1](packed_frame)\n"
1964
1963
  " if frame then\n"
1965
1964
  " local count = process_event_and_frame(message, frame, index, use_facts)\n"
1965
+ "redis.call(\"hincrby\", \"debug1\", frames_key, count)\n"
1966
1966
  " result = result + count\n"
1967
1967
  " if count == 0 or use_facts then\n"
1968
+ "redis.call(\"hincrby\", \"debug2\", frames_key, count)\n"
1968
1969
  " redis.call(\"lpush\", frames_key, packed_frame)\n"
1969
1970
  " else\n"
1970
1971
  " break\n"
@@ -2066,7 +2067,6 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
2066
2067
  "local process_message = function(message)\n"
2067
2068
  " for index = 6, 5 + keys_count, 1 do\n"
2068
2069
  " results = {}\n"
2069
- " unpacked_results = {}\n"
2070
2070
  " key = ARGV[index]\n"
2071
2071
  " context = context_directory[key]\n"
2072
2072
  " if context then\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.40
4
+ version: 0.34.41
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-09-02 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake