Skip to content

Commit

Permalink
Merge pull request #170 from bpitman/master
Browse files Browse the repository at this point in the history
Create config option to [not] wait for dynamic prop init
  • Loading branch information
brharrington committed Sep 11, 2015
2 parents 8aaed25 + 2dc41d7 commit 44bbac6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ private static Callable<PollingResponse> getCallback(Config cfg) throws Exceptio
}

private static PollingStrategy getPollingStrategy(Config cfg) {
final String prop = "netflix.iep.archaius.polling-interval";
final long interval = cfg.getDuration(prop, TimeUnit.MILLISECONDS);
return new FixedPollingStrategy(interval, TimeUnit.MILLISECONDS);
final String propPollingInterval = "netflix.iep.archaius.polling-interval";
final String propSyncInit = "netflix.iep.archaius.sync-init";
final long interval = cfg.getDuration(propPollingInterval, TimeUnit.MILLISECONDS);
return new FixedPollingStrategy(interval, TimeUnit.MILLISECONDS, cfg.getBoolean(propSyncInit));
}

public static PollingDynamicConfig getDynamicConfig(Config cfg) throws Exception {
Expand Down
3 changes: 2 additions & 1 deletion iep-platformservice/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

netflix.iep.archaius {
sync-init = true
polling-interval = 30s
}
}

0 comments on commit 44bbac6

Please sign in to comment.