Thanks for the response, but this won’t work. Please allow me to clarify.
I have a routine which fetches new information from several websites and stores it in a database. This routine runs automatically once per day, for every item. The information displayed in Dash is from the database.
I want to have a button on my front-end Dash app that will trigger this routine manually for the specific item they are looking at, so the information the user is looking at is up to date. Once the routine is completed and the database is updated, the dash webpage should be refreshed, pulling all the new information from the database. If I can just redirect the user to the current page once the routine finishes, then the problem is solved.
My app is set up like this:
index.py - pulls the layout from the appropriate subpage and serves it
app.py - houses the dependencies, and the connection to my backend API
all.py - shows a summary of all my items. It has a layout variable, which is a navbar, dash datatable, and footer. The navbar and foot are pulled from the components folder.
detail.py - shows a detailed view of the item. it grabs several items from the components folder and assembles them onto the webpage (navbar, footer, summary, history, etc…)
navbar.py - a navigation bar to be used on pages
footer.py - a footer component to be used on pages
summary.py - show a summary of the item, IDs, item name, etc…
history.py - shows a history of transactions for the item
statistics.py - shows different types of statistics for the item for a period defined be the user.
Many of these components already have controls associated with them to manipulate the data, so they can’t have another callback in the output function.
My other thought was to have the button just be a link to a new URL - http://localhost/refresh_data/item/505 would be a page which refreshes the data for item 505, and then redirects them to the previous page, but I think there should be an easier way to do it.