Created
October 16, 2012 21:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ManagedOperation | |
@Scheduled(cron = "0 0 0 * * SUN") | |
public void purgeOrphanedScores() { | |
synchronized (LeadScoringServiceDb.class) { | |
stopWatchStart("purgeOrphanedScores"); | |
try { | |
int orphanedScoreCount = scoreDAO.getOrphanedScoreCount(); | |
if (orphanedScoreCount > 0) { | |
scoreDAO.deleteOrphanedScores(); | |
Log.info(Log.Context.LeadScoring, "Deleted " + orphanedScoreCount + " orphaned scores"); | |
} | |
} catch (BridgeException e) { | |
Log.error(Log.Context.Contact, e); | |
} | |
stopWatchStop("purgeOrphanedScores"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment