Skip to content

Commit

Permalink
ua_prune.cc: skip volume prune information if no job is pruned
Browse files Browse the repository at this point in the history
Fixes #1234: Log spammed with "0 jobs that will be pruned" after upgrade
  • Loading branch information
pstorz committed Apr 28, 2020
1 parent 6b6450e commit 81d5408
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/src/dird/ua_prune.cc
Expand Up @@ -911,13 +911,12 @@ int GetPruneListForVolume(UaContext* ua, MediaDbRecord* mr, del_ctx* del)
return 0;
}
int NumJobsToBePruned = ExcludeRunningJobsFromList(del);

Jmsg(ua->jcr, M_INFO, 0,
_("Volume \"%s\" has Volume Retention of %d sec. and has %d jobs that "
"will "
"be pruned\n"),
mr->VolumeName, VolRetention, NumJobsToBePruned);

if (NumJobsToBePruned > 0) {
Jmsg(ua->jcr, M_INFO, 0,
_("Volume \"%s\" has Volume Retention of %d sec. and has %d jobs that "
"will be pruned\n"),
mr->VolumeName, VolRetention, NumJobsToBePruned);
}
return NumJobsToBePruned;
}

Expand Down

0 comments on commit 81d5408

Please sign in to comment.