Skip to content

Commit

Permalink
if history can't be found, chances are that syncTriggers needs to be …
Browse files Browse the repository at this point in the history
…run.
  • Loading branch information
chenson42 committed Sep 10, 2010
1 parent 77511f2 commit ea22fb1
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -118,6 +118,12 @@ public void insertReloadEvent(final Node targetNode, final TriggerRouter trigger
private TriggerHistory lookupTriggerHistory(Trigger trigger) {
TriggerHistory history = triggerRouterService.getNewestTriggerHistoryForTrigger(trigger
.getTriggerId());

if (history == null) {
triggerRouterService.syncTriggers();
history = triggerRouterService.getNewestTriggerHistoryForTrigger(trigger
.getTriggerId());
}

if (history == null) {
throw new RuntimeException("Cannot find history for trigger " + trigger.getTriggerId()
Expand Down

0 comments on commit ea22fb1

Please sign in to comment.