2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 11:21:24 +00:00

Allow running without old_repo specified

This commit is contained in:
asonix 2023-09-30 22:45:31 -05:00
parent 81c6e73b5f
commit 4c7067d4ca
3 changed files with 2 additions and 17 deletions

View file

@ -4,7 +4,6 @@ read_only = false
max_file_count = 1
[client]
pool_size = 100
timeout = 30
[tracing.logging]
@ -21,9 +20,6 @@ targets = "info"
[metrics]
[old_repo]
path = "/mnt/sled-repo"
cache_capacity = 67108864
export_path = "/mnt/exports"
[media]
external_validation_timeout = 30

View file

@ -19,13 +19,6 @@ max_file_count = 1
## Client configuration
[client]
## Optional: connection pool size for internal http client
# environment variable: PICTRS__CLIENT__POOL_SIZE
# default: 100
#
# Sets the maximum number of allowed idle connections per-host.
pool_size = 100
## Optional: time (in seconds) the client will wait for a response before giving up
# environment variable: PICTRS__CLIENT__TIMEOUT
# default: 30
@ -135,11 +128,6 @@ prometheus_address = "0.0.0.0:9000"
# default: /mnt/sled-repo
path = '/mnt/sled-repo'
## Optional: in-memory cache capacity for sled data (in bytes)
# environment variable: PICTRS__OLD_REPO__CACHE_CAPACITY
# default: 67,108,864 (1024 * 1024 * 64, or 64MB)
cache_capacity = 67108864
## Media Processing Configuration
[media]

View file

@ -18,6 +18,7 @@ pub(crate) struct ConfigFile {
#[serde(default)]
pub(crate) metrics: Metrics,
#[serde(default)]
old_repo: OldRepo,
pub(crate) media: Media,
@ -424,7 +425,7 @@ impl Media {
}
}
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "snake_case")]
pub(crate) struct OldRepo {
pub(crate) path: Option<PathBuf>,