Skip to content

Commit

Permalink
fixup! fixup! feat(iota-data-ingestion-core): add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiupopescu199 committed Dec 20, 2024
1 parent 1c588e6 commit 50cc40f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions crates/iota-data-ingestion-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@ The `run()` method is responsible for starting the actor. It creates an [inotify

```rust
loop {
tokio::select! {
// Graceful shutdown
_ = &mut self.exit_receiver => break,
// Receive from Workers the processed checkpoint sequence numbers, this means that the
// files are no longer and a GC can be safely performed
Some(gc_checkpoint_number) = self.processed_receiver.recv() => {
self.gc_processed_files(gc_checkpoint_number).expect("Failed to clean the directory");
}
// `self.sync()` is invoked either after waiting `self.options.tick_interval_ms`
// without a new file notification, or immediately upon receiving such a notification.
Ok(Some(_)) | Err(_) = timeout(Duration::from_millis(self.options.tick_interval_ms), inotify_recv.recv()) => {
self.sync().await.expect("Failed to read checkpoint files");
}
}
tokio::select! {
// Graceful shutdown
_ = &mut self.exit_receiver => break,
// Receive from Workers the processed checkpoint sequence numbers, this means that the
// files are no longer and a GC can be safely performed
Some(gc_checkpoint_number) = self.processed_receiver.recv() => {
self.gc_processed_files(gc_checkpoint_number).expect("Failed to clean the directory");
}
// `self.sync()` is invoked either after waiting `self.options.tick_interval_ms`
// without a new file notification, or immediately upon receiving such a notification.
Ok(Some(_)) | Err(_) = timeout(Duration::from_millis(self.options.tick_interval_ms), inotify_recv.recv()) => {
self.sync().await.expect("Failed to read checkpoint files");
}
}
}
```

Expand Down

0 comments on commit 50cc40f

Please sign in to comment.