You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2022-04-20 11:16:24,630 snooze ERROR list index out of range
Traceback (most recent call last):
File "/opt/snooze/lib/python3.6/site-packages/snooze/core.py", line 125, in process_record
record = plugin.process(record)
File "/opt/snooze/lib/python3.6/site-packages/snooze/plugins/core/aggregaterule/plugin.py", line 34, in process
record = self.match_aggregate(record, aggrule.throttle, aggrule.flapping, aggrule.watch, aggrule.name)
File "/opt/snooze/lib/python3.6/site-packages/snooze/plugins/core/aggregaterule/plugin.py", line 60, in match_aggregate
aggregate = aggregate_result['data'][0]
IndexError: list index out of range
We're in a situation where Database.search() returns a dict with a data and a count that do not correspond to each other.
Maybe it's better to drop that count. Both python and javascript can access an array length in a cheap manner.
The text was updated successfully, but these errors were encountered:
The following error sometimes happen:
https://github.com/snoozeweb/snooze/blob/v1.4.0/snooze/plugins/core/aggregaterule/plugin.py#L60
We're in a situation where
Database.search()
returns adict
with a data and a count that do not correspond to each other.Maybe it's better to drop that
count
. Both python and javascript can access an array length in a cheap manner.The text was updated successfully, but these errors were encountered: