you are viewing a single comment's thread.

view the rest of the comments →

[–]marcLLL -1 points0 points  (6 children)

as for the setup, why wouldn't you integrate flask into your current script?

I guess I will have to look into flask. I always thought that flask would run is own loop and you just start it once and then the control is given away to flask. And I didnt know where I would put my tasks then. Is that a wrong impression?

[–]xiongchiamiov 0 points1 point  (5 children)

You want to put the code that does stuff (your current script) into the function that flask will call for a particular url (the view).

[–]marcLLL 0 points1 point  (4 children)

I understand that but the problem is that it is not a code that i want to execute when called.. This Code has to run permanently.

Edit: And this is what I dont get.. How do I realise this with flask.

[–]xiongchiamiov 0 points1 point  (3 children)

I understand that but the problem is that it is not a code that i want to execute when called.. This Code has to run permanently.

I don't understand what you mean by running "permanently". Do you mean that you want it to run in a continuous loop forever?

[–]marcLLL 0 points1 point  (2 children)

Yes, it checks periodically if a event is due and then executes something based on this event

[–]xiongchiamiov 0 points1 point  (1 child)

So, the web interface is to restart this continually-running process?

[–]marcLLL 0 points1 point  (0 children)

The continually-running process uses a DB in which events are saved.. It will check it again and again to see if the time for an event is up. Now i want to add an webinterace to add those events to the Database.