Skip to content

Commit fff8a83

Browse files
authored
Timestamp fix
Added pull request wintoncode#58
1 parent 5867a1c commit fff8a83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

winton_kafka_streams/processor/_record_collector.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ def send(self, topic, key, value, timestamp,
3535

3636
while not produced:
3737
try:
38+
if isinstance(timestamp, tuple) and timestamp:
39+
timestamp = timestamp[-1]
40+
if isinstance(timestamp, float):
41+
timestamp = int(timestamp)
42+
3843
self.producer.produce(topic, ser_value, ser_key, partition, self.on_delivery, partitioner, timestamp)
3944
self.producer.poll(0) # Ensure previous message's delivery reports are served
4045
produced = True

0 commit comments

Comments
 (0)