Skip to content

Commit e4e1ae7

Browse files
Issue 350: Wrong retention type in Python binding (#351)
Fix the Wrong retention type in Python binding. StreamRetentionPolicy.by_time() should create a Retention with type RetentionType::Time. Signed-off-by: thekingofcity <[email protected]> Co-authored-by: Tom Kaitchuck <[email protected]>
1 parent b57b2ea commit e4e1ae7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/src/stream_manager.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl StreamRetentionPolicy {
7878
pub fn by_time(time_in_millis: i64) -> StreamRetentionPolicy {
7979
StreamRetentionPolicy {
8080
retention: Retention {
81-
retention_type: RetentionType::Size,
81+
retention_type: RetentionType::Time,
8282
retention_param: time_in_millis,
8383
},
8484
}
@@ -228,7 +228,7 @@ impl StreamManager {
228228
}
229229

230230
///
231-
/// Create a Stream in Pravega
231+
/// Create a Stream in Pravega.
232232
///
233233
#[pyo3(text_signature = "($self, scope_name, stream_name, scaling_policy, retention_policy, tags)")]
234234
#[args(
@@ -288,7 +288,7 @@ impl StreamManager {
288288
}
289289

290290
///
291-
/// Update Stream Configuration in Pravega
291+
/// Update Stream Configuration in Pravega.
292292
///
293293
#[pyo3(text_signature = "($self, scope_name, stream_name, scaling_policy, retention_policy, tags)")]
294294
#[args(
@@ -329,7 +329,7 @@ impl StreamManager {
329329
}
330330

331331
///
332-
/// Get Stream tags from Pravega
332+
/// Get Stream tags from Pravega.
333333
///
334334
#[pyo3(text_signature = "($self, scope_name, stream_name, scaling_policy, retention_policy, tags)")]
335335
pub fn get_stream_tags(&self, scope_name: &str, stream_name: &str) -> PyResult<Option<Vec<String>>> {
@@ -353,7 +353,7 @@ impl StreamManager {
353353
}
354354

355355
///
356-
/// Create a Stream in Pravega.
356+
/// Seal a Stream in Pravega.
357357
///
358358
#[pyo3(text_signature = "($self, scope_name, stream_name)")]
359359
pub fn seal_stream(&self, scope_name: &str, stream_name: &str) -> PyResult<bool> {

0 commit comments

Comments
 (0)