However, it doesn’t actually update on screen. The title says “Updating…” and the plot remains the same. Eventually, I get heroku[web.1]: Idling and the app spins down. This could be Heroku protecting from people keeping apps running all the time, but I wanted to ask here first.
Very close, when I navigate to https://safe-island-13543.herokuapp.com it always shows the newest available time as 8/21/17-13:15 and 5 minutes later it will update with the correct information. Any thoughts?
So what you wrote here confused me. I can now confirm that when I navigate to the app, the most recent time it displays is some previous time and not the most recent one. Sounds like your functions are not being fire when you first
One difference I note between the wind app and yours is that you assigned the generate functions as children to your graphs, but I don’t see how that should affect anything
app.layout = html.Div(children = [
html.H1(children = 'CRC Status'),
dcc.Graph(
id = 'crc-graph',
figure = generate_figure()
),
html.Table(
id = 'crc-table',
children = generate_table(),
),
dcc.Interval(
id = 'interval-component',
interval = 5 * 60 * 1000
)
]
)
Sorry, I should have been more clear. I was trying to narrow down the issue on the fly.
One difference I note between the wind app and yours is that you assigned the generate functions as children to your graphs, but I don’t see how that should affect anything
If I don’t do this my layout won’t contain anything until the first interval ticks. Because I don’t need, or want, a short interval, this is problematic. I can also confirm that this behavior isn’t Heroku specific. It happens when I run the app locally too (although it was less obvious because I was restarting the server as I was making changes).
I haven’t poked around in the code at all, but is it possible to get the interval to tick once when someone navigates to the app?