Skip to content

Commit

Permalink
logging for purge
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Feb 24, 2008
1 parent ebf7204 commit 5f8c880
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -176,6 +176,7 @@ private void purgeBatchesOlderThan(final Calendar time) {
.getTime() }, Integer.class);
int eventRowCount = 0;
int dataIdCount = 0;
int batchesPurged = 0;
long ts = System.currentTimeMillis();
for (final Integer batchId : batchIds) {
do {
Expand All @@ -199,12 +200,12 @@ public Object doInTransaction(final TransactionStatus s) {
eventRowCount += dataIdCount;

if (System.currentTimeMillis() - ts > DateUtils.MILLIS_PER_MINUTE * 5) {
logger.info("Purged " + batchIds.size() + " a total of batches and " + eventRowCount
logger.info("Purged " + batchesPurged + " out of " + batchIds.size() + " total and " + eventRowCount
+ " data_events.");
ts = System.currentTimeMillis();
}
} while (dataIdCount > 0);

batchesPurged++;
}

if (batchIds.size() > 0) {
Expand Down

0 comments on commit 5f8c880

Please sign in to comment.