Skip to content
Permalink
Browse files

Merge pull request #1358 from mozilla/fix_bulk_queue

Fix bulk queue to lock before saving to ES
  • Loading branch information...
pwnbus committed Jul 9, 2019
2 parents e9fbd8b + 5d44831 commit 044fda4e79f0d814559ed8450d2c7fd656c1962c
Showing with 9 additions and 3 deletions.
  1. +6 −0 mozdef_util/HISTORY.rst
  2. +1 −1 mozdef_util/mozdef_util/bulk_queue.py
  3. +1 −1 mozdef_util/setup.py
  4. +1 −1 requirements.txt
@@ -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 @@ def size(self):

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 @@
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

0 comments on commit 044fda4

Please sign in to comment.
You can’t perform that action at this time.