Skip to content

Commit

Permalink
Merge pull request #1583 from guardian/jsh/be-cool-about-switches-1
Browse files Browse the repository at this point in the history
Don't poll every second for switchboard changes
  • Loading branch information
jonathonherbert authored May 15, 2024
2 parents 5534d77 + fa8522b commit 1a7dee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/switchboard/Switchboard.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Lifecycle(conf: SwitchboardConfiguration, scheduler: Scheduler) extends Lo

logger.info("Starting switchboard cache")
scheduler.scheduleWithFixedDelay(0.seconds, 1.minute) { () => refreshSwitches() }
scheduler.scheduleWithFixedDelay(0.seconds, 1.seconds) { () => refreshSwitches() }
scheduler.scheduleOnce(0.seconds) { () => refreshSwitches() }

def refreshSwitches(): Unit = {
logger.info("Refreshing switches from switchboard")
Expand Down

0 comments on commit 1a7dee7

Please sign in to comment.