Indexer: Improve logging + cache management

This commit is contained in:
Yorhel 2016-11-20 07:31:55 +01:00
parent 4bdd91f65e
commit a1e5a2d80d
3 changed files with 29 additions and 14 deletions

View file

@ -72,6 +72,11 @@ fn main() {
.filter(Some("postgres"), if verbose >= 4 { log::LogLevelFilter::Trace } else { log::LogLevelFilter::Info })
.init().unwrap();
if let Err(e) = open::clear_cache() {
error!("Error clearing cache: {}", e);
return;
}
let dbhost = match std::env::var("MANNED_PG") {
Ok(x) => x,
Err(_) => { error!("MANNED_PG not set."); return }