Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions ydb/_grpc/grpcwrapper/ydb_topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,18 +479,12 @@ class TopicReadSettings(IToProto):
def to_proto(
self,
) -> ydb_topic_pb2.StreamReadMessage.InitRequest.TopicReadSettings:
res = ydb_topic_pb2.StreamReadMessage.InitRequest.TopicReadSettings()
res.path = self.path
res.partition_ids.extend(self.partition_ids)
max_lag = proto_duration_from_timedelta(self.max_lag)
if max_lag is not None:
res.max_lag = max_lag

read_from = proto_timestamp_from_datetime(self.read_from)
if read_from is not None:
res.read_from = read_from

return res
return ydb_topic_pb2.StreamReadMessage.InitRequest.TopicReadSettings(
path=self.path,
partition_ids=self.partition_ids,
max_lag=proto_duration_from_timedelta(self.max_lag),
read_from=proto_timestamp_from_datetime(self.read_from),
)

@dataclass
class InitResponse(IFromProto):
Expand Down
Loading