From fa8522bcf151ad163c6044cff5801ea80109c3c6 Mon Sep 17 00:00:00 2001 From: Jonathon Herbert Date: Wed, 15 May 2024 17:17:54 +0100 Subject: [PATCH] Don't poll every second for switchboard changes --- app/switchboard/Switchboard.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/switchboard/Switchboard.scala b/app/switchboard/Switchboard.scala index 3e8e6866002..97584a98dcb 100644 --- a/app/switchboard/Switchboard.scala +++ b/app/switchboard/Switchboard.scala @@ -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")