Skip to content

Commit

Permalink
Fix StreamTarget and KafkaTarget init on flow reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper committed Dec 26, 2023
1 parent 576ffef commit 1cb2ad1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storey/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,13 +839,13 @@ def __init__(

self._shards = shards
self._retention_period_hours = retention_period_hours
self._initialized = False

self._full_event = full_event

def _init(self):
Flow._init(self)
_Writer._init(self)
self._initialized = False
self._worker_exited = False

@staticmethod
Expand Down Expand Up @@ -1048,13 +1048,12 @@ def __init__(
Flow.__init__(self, **kwargs)
_Writer.__init__(self, columns, infer_columns_from_data, retain_dict=True)

self._initialized = False

self._full_event = full_event

def _init(self):
Flow._init(self)
_Writer._init(self)
self._initialized = False

async def _lazy_init(self):
from kafka import KafkaProducer
Expand Down

0 comments on commit 1cb2ad1

Please sign in to comment.