Skip to content

Commit

Permalink
add debug info
Browse files Browse the repository at this point in the history
Adding info regarding the file's creation time in days, current date in days
and the config value artifacts life time is set to, for easier debugging

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2151549
Signed-off-by: dangel101 <dangel101@gmail.com>
  • Loading branch information
dangel101 authored and mwperina committed Feb 8, 2023
1 parent e2f9104 commit 19c66a8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ private void checkExecutionTimeStamp() {
return;
}
long todayInDays = FileTime.fromMillis(new Date().getTime()).to(TimeUnit.DAYS);
log.debug(
"'{}' creation time in days: {}. Current date in days: {}. Artifacts life time is set to: {}",
file.getAbsolutePath(),
creationInDays,
todayInDays,
artifactsLifeTime);
if (todayInDays - creationInDays > artifactsLifeTime) {
log.debug("Deleting directory '{}'", file.getAbsolutePath());
try {
Expand Down

0 comments on commit 19c66a8

Please sign in to comment.