Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Framework background tasks
#1
Hello there

So this is my first thread Smile

I'm currently making a interface for managing our building. The scope of this project is getting a smarter building. My code is basically ready but there's always room for improvement. Never be satisfied Big Grin

These are the tasks i'm currently running:
  • Getting temperature and setpoint data from about 50 rooms [every 5 minutes] ==> database
  • Decide whether the building needs to be cooled or heated based on my own algorithm (looks more complicated then it is) and change a webrelay based on this decision [every 15 minutes]
  • Getting flowmeter data because the building gets it's heat throug series of heatpumps with ground water [every 1 minute]
  • Sending a monthly report for deciding whether a maintenance is nescessary on the ground water pumps [every 1st of the month]
  • In case of errors or warnings on the flowmeter ==> email [every 5 minutes]

I'm not really satisfied of the project right now because I have 2 running back-ends. I have 1 back-end in NodeJS for communicating between my UI (written in Angular5) and DB which serves for getting data and communicating to the webrelais (CORS and security), and I have 1 for saving data to the DB in Python.

The problem is that when I decide I want to remotely override the python webrelais decision with the UI, i really can't do it without using the database as kind of "broker". I don't think this is the best way to do this.

So what I'm basically searching for is a python framework or solution, which allows me to run recurring background tasks (multiple at once) and serving an API at the same time in 1 script.

If my question wasn't clear or you need more info just ask me Big Grin

I'm sorry if my English is kinda hairy

Thanks in advance!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  repetition of tasks lpcoutinho 1 2,893 Nov-25-2017, 05:51 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020