Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every event should have a timestamp field by default #2

Open
FCO opened this issue Feb 10, 2020 · 2 comments
Open

Every event should have a timestamp field by default #2

FCO opened this issue Feb 10, 2020 · 2 comments

Comments

@FCO
Copy link
Owner

FCO commented Feb 10, 2020

If not defined, it should be set to now().
The first filter should always be by time, that way we would not search on expirated queries.

@FCO
Copy link
Owner Author

FCO commented Feb 10, 2020

after time, we should order by the coast. I mean, first "==" than the btrees

@FCO
Copy link
Owner Author

FCO commented Feb 17, 2020

Added timestamp on 3f6a146.

On interval, we should delete all branches smaller than X min before the current timestamp. being X a configurable interval.

FCO added a commit that referenced this issue Feb 19, 2020
bin/eel -e='event bla { has $test; match { bla(#1, a == 42) bla(#2, a == 13) } }'
Nil
Nil
11
AST:D] @!ast = Array[Event::AST:D].new(Event::AST::EventDeclaration.new(name => "bla", attrs => {:test(Event::AST::NoValue)}, body => $(Event::AST::EventMatcher.new(id => "#1", name => "bla", conds => [Event::AST::Condition.new(opt => Bool::False, var => "a", op => "==", value => Event::AST::Value.new(value => 42))]), Event::AST::EventMatcher.new(id => "#2", name => "bla", conds => [Event::AST::Condition.new(opt => Bool::False, var => "a", op => "==", value => Event::AST::Value.new(value => 13))]))))
29
17
34
44
62
67
44
62
67
Array @!rules = [{:cmd("query"), :id("#1"), :next(${:cmd("query"), :id("#2"), :next(${:cmd("dispatch"), :data(-> %state { #`(Block|140319827772488) ... })}), :query(${:a("==" => 13), :type("==" => "bla")}), :store}), :query(${:a("==" => 42), :type("==" => "bla")}), :store},]
{ "type" : "bla", "a" : 42 }
{ "type" : "bla", "a" : 13 }
(timestamp => Instant:1582079826.302598)
FCO added a commit that referenced this issue Feb 19, 2020
for i in '{ "type" : "bla", "a" : 42 }' '{ "type" : "bla", "a" : 13 }'; do echo $i; done | bin/eel -e='event ble { has $a1 = #1.a; has $a2 = #2.a; match { bla(#1, a == 42) bla(#2, a == 13) } }'
{"type":"ble","a1":42,"timestamp":"2020-02-19T14:18:53.986815Z","a2":13}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant