durable_rules 0.34.41 → 0.34.42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc5c64d1f4baff031b896777cb6cf82dcceffa93
4
- data.tar.gz: a6a2cdd3ea0baba83861f5eb68e96f2d18a87e2e
3
+ metadata.gz: f5223ecb2c51350317d09db03af3f59d5112455b
4
+ data.tar.gz: b916d078b6af3af9f45c0b8906edb07eeff06044
5
5
  SHA512:
6
- metadata.gz: db9c9d536c8f1291d2374fadaa20002e9a957d10bc80a06b77b834c39341c11b7585ecb10823936492668f651c7defd6887dda17346618e4685a360fd28feaec
7
- data.tar.gz: 9ec16e10659840043d32d59868739182be1c3b76d31e9eed8ef7022ef33c5379ea66eda06dafc437241a7f6058b2556b75acdc33cab6ad05210153e29ba5d296
6
+ metadata.gz: 4deba9a6c92c84ca3be1ceec63ecfc8349b4b1590d2025c1ae73997d6a53fecfb7e54236af9747408c48a6bd3ea937954f68b184084db93d9e8b9dfc1e2c54db
7
+ data.tar.gz: 17d06973a3888d1353e3778f7b5e6a339c4f7f7ce753fe35c366ff06418cef2b1873276e32f399e1d7c978b7f9e8532ee102c3d37f783736242e3f8d3e413c2b
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.01, &thread_lambda
1246
+ timer.after 0.25, &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/librb/interface.rb CHANGED
@@ -3,9 +3,11 @@ require "json"
3
3
 
4
4
  module Interface
5
5
  class Application < Sinatra::Base
6
+ set :bind, "0.0.0.0"
7
+
6
8
  @@host = nil
7
9
 
8
- def self.set_host(value)
10
+ def self.set_host(value)
9
11
  @@host = value
10
12
  end
11
13
 
data/src/rules/net.c CHANGED
@@ -1060,7 +1060,6 @@ 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"
1064
1063
  " for i = 1, #frame, 1 do\n"
1065
1064
  " if type(frame[i]) == \"table\" then\n"
1066
1065
  " redis.call(\"hdel\", visited_key .. sid, frame[i][\"id\"])\n"
@@ -1736,6 +1735,7 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
1736
1735
  "local toggle\n"
1737
1736
  "local expressions_count\n"
1738
1737
  "local results\n"
1738
+ "local unpacked_results\n"
1739
1739
  "local context\n"
1740
1740
  "local keys\n"
1741
1741
  "local reviewers\n"
@@ -1808,6 +1808,7 @@ 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"
1811
1812
  " for name, message in pairs(frame) do\n"
1812
1813
  " if message ~= \"$n\" and not message[\"$f\"] then\n"
1813
1814
  " redis.call(\"hdel\", events_hashset, message[\"id\"])\n"
@@ -1962,10 +1963,8 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
1962
1963
  " local frame = frame_unpackers[index - 1](packed_frame)\n"
1963
1964
  " if frame then\n"
1964
1965
  " 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"
1969
1968
  " redis.call(\"lpush\", frames_key, packed_frame)\n"
1970
1969
  " else\n"
1971
1970
  " break\n"
@@ -2067,6 +2066,7 @@ static unsigned int loadEvalMessageCommand(ruleset *tree, binding *rulesBinding)
2067
2066
  "local process_message = function(message)\n"
2068
2067
  " for index = 6, 5 + keys_count, 1 do\n"
2069
2068
  " 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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: durable_rules
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.41
4
+ version: 0.34.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesus Ruiz