зеркало из https://github.com/mozilla/MozDef.git
Merge pull request #1358 from mozilla/fix_bulk_queue
Fix bulk queue to lock before saving to ES
This commit is contained in:
Коммит
044fda4e79
|
@ -86,3 +86,9 @@ Add is_ip utility function
|
|||
|
||||
* Updated to work with python3
|
||||
* Removed support for python2
|
||||
|
||||
|
||||
3.0.1 (2019-07-08)
|
||||
------------------
|
||||
|
||||
* Updated bulk queue to acquire lock before saving events
|
||||
|
|
|
@ -52,9 +52,9 @@ class BulkQueue():
|
|||
|
||||
def flush(self):
|
||||
""" Write all stored events to ES """
|
||||
self.es_client.save_documents(self.list)
|
||||
self.lock.acquire()
|
||||
try:
|
||||
self.es_client.save_documents(self.list)
|
||||
self.list = list()
|
||||
finally:
|
||||
self.lock.release()
|
||||
|
|
|
@ -59,6 +59,6 @@ setup(
|
|||
test_suite='tests',
|
||||
tests_require=[],
|
||||
url='https://github.com/mozilla/MozDef/tree/master/lib',
|
||||
version='3.0.0',
|
||||
version='3.0.1',
|
||||
zip_safe=False,
|
||||
)
|
||||
|
|
|
@ -30,7 +30,7 @@ jmespath==0.9.3
|
|||
kombu==4.1.0
|
||||
meld3==1.0.2
|
||||
mozdef-client==1.0.11
|
||||
mozdef-util==3.0.0
|
||||
mozdef-util==3.0.1
|
||||
netaddr==0.7.19
|
||||
nose==1.3.7
|
||||
oauth2client==1.4.12
|
||||
|
|
Загрузка…
Ссылка в новой задаче