Prevent long_update from initial call (prevent_initial_call not working)

I am trying to add some text that shows if some long call-back is currently executing or has finished. At the moment the “In progress” message is displaying when the page loads up, even though prevent_initial_call is set to true

Here is my callback

output=Output(‘forecast_tag_success’, ‘children’),
inputs=Input(‘Forecast-Data-Button’, ‘n_clicks’),
(Output(‘forecast_tag_loading’, ‘children’),“Forecasting in progress”, “Forecasting finished”),

Here is my setup for long callback:

launch_uid = uuid4()
cache = diskcache.Cache("./cache")
long_callback_manager = DiskcacheLongCallbackManager(
cache, cache_by=[lambda: launch_uid], expire=60,

I can’t work out why the callback is running at the start even though prevent_initial_call is set to true does anyone know why it is?


1 Like