I’m running a Dash app embedded in flask server using this line :
app = dash.Dash(__name__,,suppress_callback_exceptions=True,server=app_flask)
I have multiple callbacks in separates which uses http requests in parralel with differents urls, :
@app.callback(Output('myoutput_id','myoutput'),Input('url_id','href')) def createDf1(url): data1 = requests.get(url) # then here I use my data to create a specific dataframe and return it
@app.callback(Output('myoutput2_id','myoutput'),Input('url2_id','href')) def createDf2(url2): data2 = requests.get(url2) # then here I use my data to create a specific dataframe and return it
I read that now the default behavior of dash is with the threaded = true …
My problem is when I make more than 3 or 4 get requests based on the previous example I see that the thread which was launched by the first callback return the value of the second requests.get() or the third one randomly.
Is there a way to make sure that the requests.get result match with the callback sender ?
I really hope that someone could help me