-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent mode for saya using mock of SNOS #2253
Changes from 1 commit
f5f02d3
86c7b89
f5c7398
85acffd
c6045c5
c2f29c2
5679046
f0c5834
74d98da
2ea4210
14b6075
9bc20a9
90169e1
bc978c3
73b7408
0537865
45e0adf
11bda52
ff1b5d2
aada160
ba2329f
f372bfd
38e4cf2
ed3f633
c680b3b
92e5590
5d3620c
be66305
931580f
74f7edf
f005215
de8095d
d1e83cc
6b8a225
65afea4
293d391
80f35f5
31519d2
518948e
0622280
7eedc60
4ed9d3a
6b05fa4
477afd5
d2f837e
61a3bb3
b5492d3
fbd16d4
d23a246
6a1e8d2
3941d38
51b6025
f2136f9
f5a9e80
46a770f
a67233e
a65bb40
5356d15
3d6be35
9ac3bdf
e47f0d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
use clap::Parser; | ||
use console::Style; | ||
use saya_core::{Saya, SayaConfig}; | ||
use tokio::signal::ctrl_c; | ||
|
||
mod args; | ||
|
||
|
@@ -23,7 +22,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |
saya.start().await?; | ||
|
||
// Wait until Ctrl + C is pressed, then shutdown | ||
ctrl_c().await?; | ||
// ctrl_c().await?; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not required anymore to be able to kill the program? Or it's handled by the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not required, as the ephemeral shard will shut itself down after reaching the shutdown event. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah but we may want to kill saya. :) In this case it would be better keeping it to ensure graceful shutdown in case of manual interruption. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is the opposite, this line simply prevents |
||
// handle.stop()?; | ||
|
||
Ok(()) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohayo, sensei! Let's add a quick check for
end_block
!The addition of the
end_block
field is a great improvement for flexibility. However, to prevent potential issues, we should ensure thatend_block
is greater than or equal tostart_block
when it's provided.Consider adding this validation in the
try_from
implementation:This check will help prevent invalid block ranges and potential runtime errors.
Also applies to: 184-184