Celery process terminated when same callback triggered multiple times

Hi Dash community!

I am trying to run multiple times the same background callback.

Here is the expected behaviour:

  • The callback is triggered every time the user click on a button.
  • The callback takes a few seconds to execute.
  • If the button is clicked again, before the first callback is finished, the callback will be triggered after the first callback has finished.

To do so, I tried to implement a celery queue.
But I am facing an issue because every time I click on the button, it kills the previous processes, as you can see on the screenshot below:

I have tried to add pattern matching callback in order to “change” the callback ID but it didnt work.

Do you have an idea of a workaround? Or maybe there is something wrong I am doing?

Thank you for your time and help.