Skip to content

Commit a5322f2

Browse files
committed
Catch Scroll Clear NotFound Error
1 parent 4dd50dc commit a5322f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

elastalert/elastalert.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from elasticsearch.exceptions import ConnectionError
2525
from elasticsearch.exceptions import ElasticsearchException
2626
from elasticsearch.exceptions import TransportError
27+
from elasticsearch.exceptions import NotFoundError
2728

2829
from . import kibana
2930
from .alerts import DebugAlerter
@@ -657,7 +658,10 @@ def run_query(self, rule, start=None, end=None, scroll=False):
657658

658659
if 'scroll_id' in rule:
659660
scroll_id = rule.pop('scroll_id')
660-
self.thread_data.current_es.clear_scroll(scroll_id=scroll_id)
661+
try:
662+
self.thread_data.current_es.clear_scroll(scroll_id=scroll_id)
663+
except NotFoundError:
664+
pass
661665

662666
return True
663667

0 commit comments

Comments
 (0)