Skip to content

Commit c60e46b

Browse files
author
Dan Shemesh
committed
receives timestamp in iso format
1 parent 33814c1 commit c60e46b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jumper_logging_agent/agent.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ def is_fifo(filename):
3434

3535

3636
def open_fifo_read(filename):
37-
if not os.path.exists(DEFAULT_INPUT_FILENAME):
38-
os.makedirs(os.path.dirname(DEFAULT_INPUT_FILENAME))
37+
if not os.path.exists(filename):
38+
dirname = os.path.dirname(filename)
39+
if not os.path.exists(dirname):
40+
os.makedirs(dirname)
3941
try:
4042
os.mkfifo(filename)
4143
except OSError as e:
@@ -192,7 +194,7 @@ def write_events(self, events):
192194
for event in events:
193195
timestamp = event.pop('timestamp', None)
194196
if timestamp:
195-
event['keen'] = dict(timestamp=datetime.datetime.fromtimestamp(timestamp).isoformat())
197+
event['keen'] = dict(timestamp=timestamp)
196198

197199
events_dict = {self.project_id: events}
198200
self.event_store.add_events(events_dict)

0 commit comments

Comments
 (0)