I want to offload some heavy calculation processes from my Django web app, and thought that always-on tasks might be the way to go in PythonAnywhere (since Celery is unsupported).
I imagine the process would be like this:
- A user sends a "Calculate" request from the Django web interface
- The web app updates a DB value
- The always-on task picks up the DB's value signalling to do some calculation, and takes up CPU time
- After calculation, the always-on task returns back to normal mode without burning CPU time
Can this be done? Or perhaps there is a better way to do this in PythonAnywhere, like maybe use a different way to listen to those "calculation begin" signals?