Getting Scheduled Tasks to Work with Live Reloading #32247
-
I'm working on an application that is accessing an external API and needs to store an access token for that API. To do that, I have a scheduled event every 12 hours that grabs a new access token and stores it in memory. This generally works great, since the scheduled task runs on start-up and then continuously after that to prevent the token from expiring. However, when I use quarkus in dev mode and make a change, live reloading seems to get triggered by the first API call that I make to the application, and this API call is handled before the scheduled event is rerun. Thus, whenever the application is live reloaded, the first API call fails and then I immediately see the scheduled event run and fetch a new access token. Any ideas on how to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
/cc @mkouba (scheduler) |
Beta Was this translation helpful? Give feedback.
/cc @mkouba (scheduler)