File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,19 @@ In a query you start by getting events from a bucket and assign that collection
2525After that you assign what you want to receive from the request to the RETURN variable.
2626
2727Magic Variables:
28-
2928 There is a magic variable `__CATEGORIES__ ` you can use in the web UI's Query Explorer to include your configured categories in your query.
3029
31- Here's an example of using this variable to find all events categorized as "Work "
30+ Here's an example of using this variable to find all events categorized as "Web Browsing "
3231
3332 .. code-block :: python
3433
35- events = flood(query_bucket(" aw-watcher-window_" ));
36- not_afk = flood(query_bucket(" aw-watcher-afk_" ));
34+ events = flood(query_bucket(find_bucket( " aw-watcher-window_" ) ));
35+ not_afk = flood(query_bucket(find_bucket( " aw-watcher-afk_" ) ));
3736 not_afk = filter_keyvals(not_afk, " status" , [" not-afk" ]);
3837 events = filter_period_intersect(events, not_afk);
3938 events = categorize(events, __CATEGORIES__ );
4039 events = filter_keyvals(events, " $category" , [[" Work" ]]);
41- RETURN = events;
40+ RETURN = sort_by_duration( events) ;
4241
4342 Minimal example:
4443 Minimal query which only gets events from a bucket and returns it:
You can’t perform that action at this time.
0 commit comments