Clean db code, switch to deadpool

This commit is contained in:
asonix
2020-04-21 12:07:39 -05:00
parent 4d07476fe7
commit 82e8042c66
9 changed files with 149 additions and 163 deletions
+4 -4
View File
@@ -17,7 +17,7 @@ pub struct Config {
database_url: String,
pretty_log: bool,
publish_blocks: bool,
connections_per_core: u32,
max_connections: usize,
}
pub enum UrlKind {
@@ -46,7 +46,7 @@ impl Config {
.set_default("https", false)?
.set_default("pretty_log", true)?
.set_default("publish_blocks", false)?
.set_default("connections_per_core", 2)?
.set_default("max_connections", 2)?
.merge(Environment::new())?;
Ok(config.try_into()?)
@@ -56,8 +56,8 @@ impl Config {
self.pretty_log
}
pub fn connections_per_core(&self) -> u32 {
self.connections_per_core
pub fn max_connections(&self) -> usize {
self.max_connections
}
pub fn validate_signatures(&self) -> bool {