diff options
author | Keuin <[email protected]> | 2022-03-28 21:40:33 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-03-28 21:40:33 +0800 |
commit | 026f5839e2359d565229c05b768f8a7ed694bf4b (patch) | |
tree | 2495fe6397e5f1ff81eeee37b844387f1be45d4c /src/config.rs | |
parent | 2d3f83cb7f78706c1ba5af966afc5625037ab5ce (diff) |
Make `sqlite_thread_pool_size` configurable.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 1300e9a..2f4bbd8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -19,6 +19,8 @@ pub struct Config { pub log_level: String, #[serde(default = "Config::default_max_body_size")] pub max_body_size: u64, + #[serde(default = "Config::default_sqlite_thread_pool_size")] + pub sqlite_thread_pool_size: u32, } impl Config { @@ -41,6 +43,10 @@ impl Config { fn default_db_file() -> String { String::from("kimikuri.db") } + + fn default_sqlite_thread_pool_size() -> u32 { + 16 + } } |