File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Arguments:
23
23
Options:
24
24
-e, --expected-records <EXPECTED_RECORDS> [default: 0]
25
25
-d, --delay <DELAY> [default: 30]
26
+ --delta <DELTA> [default: 1000]
26
27
-h, --help Print help
27
28
-V, --version Print version
28
29
```
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ struct Args {
21
21
22
22
#[ arg( short, long, default_value = "30" ) ]
23
23
delay : u64 ,
24
+
25
+ #[ arg( long, default_value = "1000" ) ]
26
+ delta : u64 ,
24
27
}
25
28
26
29
impl Args {
@@ -128,8 +131,8 @@ async fn main() -> Result<(), reqwest::Error> {
128
131
129
132
loop {
130
133
let total_records = client. total_records ( ) . await ?;
131
- if ( expected_records as i64 - total_records as i64 ) . abs ( ) > 1000 {
132
- eprintln ! ( "Records count difference is more than 1000 , waiting for logs..." ) ;
134
+ if ( expected_records as i64 - total_records as i64 ) . abs ( ) > args . delta as i64 {
135
+ eprintln ! ( "Records count difference is more than {} , waiting for logs..." , args . delta ) ;
133
136
let logs = client. get_logs ( ) . await ?;
134
137
for log in & logs {
135
138
if log. timestamp > last_log_timestamp && log. is_update ( ) {
You can’t perform that action at this time.
0 commit comments