File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use crate::lifecycle::invocation_times::InvocationTimes;
77
88const DEFAULT_FLUSH_INTERVAL : u64 = 60 * 1000 ; // 60s
99const TWENTY_SECONDS : u64 = 20 * 1000 ;
10+ const FIFTEEN_MINUTES : u64 = 15 * 60 * 1000 ;
1011
1112#[ derive( Clone , Copy , Debug , PartialEq ) ]
1213pub struct FlushControl {
@@ -63,7 +64,9 @@ impl FlushControl {
6364 FlushStrategy :: Periodically ( p) | FlushStrategy :: EndPeriodically ( p) => {
6465 tokio:: time:: interval ( tokio:: time:: Duration :: from_millis ( p. interval ) )
6566 }
66- FlushStrategy :: End => tokio:: time:: interval ( tokio:: time:: Duration :: MAX ) ,
67+ FlushStrategy :: End => {
68+ tokio:: time:: interval ( tokio:: time:: Duration :: from_millis ( FIFTEEN_MINUTES ) )
69+ }
6770 }
6871 }
6972
@@ -165,7 +168,7 @@ mod tests {
165168 let flush_control = FlushControl :: new ( FlushStrategy :: End ) ;
166169 assert_eq ! (
167170 flush_control. get_flush_interval( ) . period( ) . as_millis( ) ,
168- tokio:: time:: Duration :: MAX . as_millis( )
171+ tokio:: time:: Duration :: from_millis ( FIFTEEN_MINUTES ) . as_millis( )
169172 ) ;
170173 }
171174}
You can’t perform that action at this time.
0 commit comments