Run while loop concurrently with Flask server

后端 未结 2 1731
心在旅途
心在旅途 2020-12-16 04:33

I\'m updating some LEDs using python. I\'ve been doing this like so:

from LEDs import *
myLEDs = LEDs()
done = False
while not done:
  myLEDs.iterate()
         


        
2条回答
  •  醉话见心
    2020-12-16 04:57

    Although I am not the most qualified to comment here: I think this might help you.

    How to run recurring task in the Python Flask framework?

提交回复
热议问题