Skip to content

Commit

Permalink
add all affected files when newer files detected
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed May 16, 2019
1 parent a6301c3 commit bb3ddad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hpsspy/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ def find_missing(hpss_map, hpss_files, disk_files_cache, missing_files,
if reName in hpss_files:
if hpss_files[reName][1] > int(row['Mtime']):
logger.debug("%s is newer than %s.", reName, f)
if (reName in missing and
missing[reName]['newer']):
newer = True
logger.info("%s is flagged as having " +
"newer files on disk, " +
"adding %s.", reName, f)
else:
newer = True
logger.warning("%s is newer than %s, " +
Expand All @@ -238,7 +244,8 @@ def find_missing(hpss_map, hpss_files, disk_files_cache, missing_files,
missing[reName]['size'] += int(row['Size'])
else:
missing[reName] = {'files': [f],
'size': int(row['Size'])}
'size': int(row['Size']),
'newer': newer}
if mapped == 0:
logger.error("%s is not mapped to any file on HPSS!", f)
nmissing += 1
Expand Down

0 comments on commit bb3ddad

Please sign in to comment.