private
def get_file_from_cache(filename, pkg_checksum, pkg_size, location)
downloaded_file_path = nil
- @log.info "WAIT CACHE CHECK",Log::LV_USER
+ @log.info "Wait for cache sync",Log::LV_USER
$cache_mutex.synchronize do
- @log.info "ENTER CACHE CHECK",Log::LV_USER
+ @log.info "Entering cache sync",Log::LV_USER
cached_filepath = get_cached_filepath(filename, pkg_checksum, pkg_size)
- @log.info "GET CACHE #{cached_filepath}",Log::LV_USER
+ @log.info "Cache file path : #{cached_filepath}",Log::LV_USER
if not cached_filepath.nil? then
- @log.info "COPY FROM CACHE",Log::LV_USER
FileUtils.cp(cached_filepath, location)
- @log.info "COPY DONE",Log::LV_USER
downloaded_file_path = File.join(location, File.basename(cached_filepath))
end
end
- @log.info "CACHE CHECK DONE",Log::LV_USER
+ @log.info "Cache sync done",Log::LV_USER
if not downloaded_file_path.nil? and not File.exist? downloaded_file_path then
downloaded_file_path = nil
end