Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/opsqueue_python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opsqueue_python"
version = "0.30.6"
version = "0.30.7"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion opsqueue/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opsqueue"
version = "0.30.6"
version = "0.30.7"
edition = "2021"
description = "lightweight batch processing queue for heavy loads"
repository = "https://github.com/channable/opsqueue"
Expand Down
2 changes: 1 addition & 1 deletion opsqueue/app/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub async fn async_main() {
prometheus_config,
));

let max_age = Duration::from_secs(60 * 60);
let max_age = config.max_submission_age.into();
scope.spawn(periodically_cleanup_old(db_pool.writer_pool(), max_age));

scope.spawn(prometheus::periodically_calculate_scaling_metrics(
Expand Down
5 changes: 5 additions & 0 deletions opsqueue/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ pub struct Config {
/// the full submission the chunk is a part of.
#[arg(long, default_value_t = 10)]
pub max_chunk_retries: u32,

#[arg(long, default_value = "1 hour")]
pub max_submission_age: humantime::Duration,
}

impl Default for Config {
Expand All @@ -88,6 +91,7 @@ impl Default for Config {
humantime::Duration::from_str("10 seconds").expect("valid humantime");
let max_missable_heartbeats = 3;
let max_chunk_retries = 10;
let max_submission_age = humantime::Duration::from_str("1 hour").expect("valid humantime");
Config {
port,
database_filename,
Expand All @@ -96,6 +100,7 @@ impl Default for Config {
heartbeat_interval,
max_missable_heartbeats,
max_chunk_retries,
max_submission_age,
}
}
}
Loading