Background Task with Dash Frontend


I am writing an application for a Raspberry Pi which monitors input pins, controls output pins, and uses Dash as a front-end for a user to configure the system. The code that monitors the input pins should run at a consistent rate and all the time, not just when a user is on the Dash application. In order to make this happen, I have the code monitoring the inputs start the Dash application as a separate process.

webProcess = Process(target=web_server.main, args=(pqueueIn, pqueueOut))

The two arguments are Queues to allow each process to send messages to each other.
Is this the proper way to structure such an application with Dash? This is my first time using Dash, and I’m pretty new to Python as well, so apologies in advance if this question has been answered in someway already and I missed it. I saw some answers suggesting to use Celery, but I didn’t think that Celery should be necessary for my application.

Thank you,