File tree Expand file tree Collapse file tree 5 files changed +10
-5
lines changed
Expand file tree Collapse file tree 5 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " opsqueue_python"
3- version = " 0.30.6 "
3+ version = " 0.30.7 "
44edition = " 2021"
55
66# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Original file line number Diff line number Diff line change 11[package ]
22name = " opsqueue"
3- version = " 0.30.6 "
3+ version = " 0.30.7 "
44edition = " 2021"
55description = " lightweight batch processing queue for heavy loads"
66repository = " https://github.com/channable/opsqueue"
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ pub async fn async_main() {
4848 prometheus_config,
4949 ) ) ;
5050
51- let max_age = Duration :: from_secs ( 60 * 60 ) ;
51+ let max_age = config . max_submission_age . into ( ) ;
5252 scope. spawn( periodically_cleanup_old( db_pool. writer_pool( ) , max_age) ) ;
5353
5454 scope. spawn( prometheus:: periodically_calculate_scaling_metrics(
Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ pub struct Config {
7474 /// the full submission the chunk is a part of.
7575 #[ arg( long, default_value_t = 10 ) ]
7676 pub max_chunk_retries : u32 ,
77+
78+ #[ arg( long, default_value = "1 hour" ) ]
79+ pub max_submission_age : humantime:: Duration ,
7780}
7881
7982impl Default for Config {
@@ -88,6 +91,7 @@ impl Default for Config {
8891 humantime:: Duration :: from_str ( "10 seconds" ) . expect ( "valid humantime" ) ;
8992 let max_missable_heartbeats = 3 ;
9093 let max_chunk_retries = 10 ;
94+ let max_submission_age = humantime:: Duration :: from_str ( "1 hour" ) . expect ( "valid humantime" ) ;
9195 Config {
9296 port,
9397 database_filename,
@@ -96,6 +100,7 @@ impl Default for Config {
96100 heartbeat_interval,
97101 max_missable_heartbeats,
98102 max_chunk_retries,
103+ max_submission_age,
99104 }
100105 }
101106}
You can’t perform that action at this time.
0 commit comments