Issue
I have a class and I am running this currently
class Bartender:
def run(self):
while self._running:
time.sleep(0.1)
bartender = Bartender()
bartender.run()
Now I want to add a simple webgui how do i do this so that the webserver is running in background and I don't need to change the main function?
Thanks
Solution
You can use celery instead of your function -> https://flask.palletsprojects.com/en/2.0.x/patterns/celery/
from celery import Celery
Answered By - Ayse
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.