зеркало из https://github.com/mozilla/MozDef.git
Only consider events that haven't already been processed
This commit is contained in:
Родитель
de2f19a581
Коммит
071b417c44
|
@ -69,7 +69,13 @@ def alert(
|
|||
'''
|
||||
|
||||
relevant_es = sorted(from_es, key=attrgetter('lastaction'), reverse=True)[0:1]
|
||||
all_evts = sorted(from_evts, key=attrgetter('lastaction'))
|
||||
if len(relevant_es) == 0:
|
||||
all_evts = from_evts
|
||||
else:
|
||||
all_evts = list(filter(
|
||||
lambda loc: loc.lastaction > relevant_es[0].lastaction,
|
||||
from_evts))
|
||||
all_evts = sorted(all_evts, key=attrgetter('lastaction'))
|
||||
locs_to_consider = relevant_es + all_evts
|
||||
|
||||
if len(locs_to_consider) < 2:
|
||||
|
|
Загрузка…
Ссылка в новой задаче