Unverified Commit 5e3be54e authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

Merge branch 'master' of...

Merge branch 'master' of gitlab.switch.ch:memoriav/memobase-2020/services/import-process/media-distributor-service
parents 1f918772 354ee356
host = "0.0.0.0:3000" # Host name and port of the running application
base_path = "/swissbib_index/mb_sftp" # Root of the sFTP directory
base_path = "/swissbib_index/mb_sftp"
cache_timeout = 3600 # Duration in seconds after which the cache is refreshed (i.e. the whole file tree is reread)
partial_cache_timeout = 5 # Duration in seconds after which the cache for a specific collection is refreshed
\ No newline at end of file
partial_cache_timeout = 5 # Duration in seconds after which the cache for a specific collection is refreshed
......@@ -112,8 +112,13 @@ impl Svc {
}
}
None if force_partial_refresh => {
let _ = self.refresh_partial_cache_if_outdated(id.split_at(7).0);
self.fetch_file(id, file_type, false)
if id.len() >= 9 {
let _ = self.refresh_partial_cache_if_outdated(id.split_at(7).0);
self.fetch_file(id, file_type, false)
} else {
warn!("{} can't be a valid id", &id);
not_found()
}
}
None => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment