Skip to content

Commit

Permalink
[ELASTIC]: Add wait interval when no logs are needed to push
Browse files Browse the repository at this point in the history
  • Loading branch information
amadolid committed Aug 8, 2023
1 parent 6f51102 commit 83cc5ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jaseci_core/jaseci/extens/svc/elastic_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from datetime import datetime
from copy import copy
from base64 import b64encode
from time import sleep
import multiprocessing
import logging.handlers

Expand Down Expand Up @@ -132,7 +133,8 @@ def elastic_log_worker(elastic_index):
try:
record = log_queue.get()
if record is None:
break
sleep(1)
continue
elastic_record = format_elastic_record(record)
self.app.doc(log=elastic_record, index=elastic_index)
except Exception:
Expand Down

0 comments on commit 83cc5ed

Please sign in to comment.