Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update replay generator #441

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions splunk_eventgen/lib/plugins/generator/replay.py
Expand Up @@ -173,9 +173,12 @@ def gen(self, count, earliest, latest, samplename=None):
rpevent, self.backfill_time, earliest, latest
)
previous_event = current_event
previous_event_timediff = rpevent["timediff"]
previous_event_timediff = line_list[index + 1]["timediff"]
breakfixrepeat marked this conversation as resolved.
Show resolved Hide resolved
self._out.bulksend([current_event])
continue
else:
previous_event = rpevent
previous_event_timediff = rpevent["timediff"]
try:
time.sleep(previous_event_timediff.total_seconds())
except ValueError:
Expand All @@ -186,8 +189,6 @@ def gen(self, count, earliest, latest, samplename=None):
logger.error("Event: {0}".format(rpevent))
pass
current_time = datetime.datetime.now()
previous_event = rpevent
previous_event_timediff = rpevent["timediff"]
send_event = self.set_time_and_tokens(
rpevent, current_time, earliest, latest
)
Expand Down