[Fixed] Notification() is delayed in production

What I’m trying to do:
Add Notification(“Running…”) to inform user that the program is running.

What I’ve tried and what’s not working:
It worked in Anvil Editor’s “Run”. Notification pops up when I clicked “New Simulation” and when the plot is updated, Notification goes away.

But in production, Notification is delayed - it only popped up briefly at the end when the plot is done. Click “New Simulation” in the app to see what I mean.

Code Sample:

  def draw(self):
    with Notification('Running...'):
      xs, ys, vs = self.Data.values()
      ...
      self.plot.figure = fig

Clone link:

Hi @mrtan that’s a link to the live app, are you able to get the clone link? And we can take a look.

@mrtan thanks for the clone. Moved to bug reports.
We’ll get that fixed.
As a workaround adjust your code to look like this

        with Notification('Running...'):
            from time import sleep
            sleep(0)
            # rest of code as before

2 Likes

Thanks for the workaround!

1 Like

This should now be fixed