Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Sreekanth <[email protected]>
  • Loading branch information
BulkBeing committed Jan 17, 2025
1 parent 45dfcd3 commit e6467a2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions rust/numaflow-core/src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,16 @@ impl TrackerHandle {
offset: Bytes,
message_tags: Option<Arc<[String]>>,
) -> Result<()> {
let mut responses: Option<Vec<String>> = None;
if self.enable_callbacks {
if let Some(tags) = message_tags {
let responses: Option<Vec<String>> = match (self.enable_callbacks, message_tags) {
(true, Some(tags)) => {
if !tags.is_empty() {
responses = Some(tags.iter().cloned().collect());
Some(tags.iter().cloned().collect::<Vec<String>>())
} else {
None
}
};
}
}
_ => None,
};
let message = ActorMessage::Update { offset, responses };
self.sender
.send(message)
Expand Down

0 comments on commit e6467a2

Please sign in to comment.