зеркало из https://github.com/mozilla/MozDef.git
correct bulk processing for new heka
This commit is contained in:
Родитель
a44e231af7
Коммит
15673e9cab
|
@ -33,14 +33,11 @@ def bulkindex():
|
||||||
for i in bulkpost.splitlines():
|
for i in bulkpost.splitlines():
|
||||||
eventlist.append(i)
|
eventlist.append(i)
|
||||||
|
|
||||||
if connection is None or connection.is_open==False:
|
|
||||||
openMQConnection()
|
|
||||||
|
|
||||||
for i in eventlist:
|
for i in eventlist:
|
||||||
try:
|
try:
|
||||||
#valid json?
|
#valid json?
|
||||||
try:
|
try:
|
||||||
eventDict=json.loads(anevent)
|
eventDict=json.loads(i)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
response.status=500
|
response.status=500
|
||||||
return
|
return
|
||||||
|
|
Загрузка…
Ссылка в новой задаче