Currently the Multifeeder updates its database at each restart of the Flask script ... Which is unhandy.
Updating the database at each API request will make the requests pretty slow, hmm.
Options:
an update button on the webpage? (not ideal)
an hourly automatic update? (cronjob restarting the supervisor service?)
Currently the Multifeeder updates its database at each restart of the Flask script ... Which is unhandy.
Updating the database at each API request will make the requests pretty slow, hmm.
Options:
- an update button on the webpage? (not ideal)
- an hourly automatic update? (cronjob restarting the supervisor service?)
This is the Flask implementation https://github.com/viniciuschiele/flask-apscheduler
Because this is a different thread, it wont intervene with your requests or need to reboot the entire application every hour.
I think you can use https://apscheduler.readthedocs.io/en/latest/
to periodically come back and execute feedtools.update()
This is the Flask implementation
https://github.com/viniciuschiele/flask-apscheduler
Because this is a different thread, it wont intervene with your requests or need to reboot the entire application every hour.
Currently the Multifeeder updates its database at each restart of the Flask script ... Which is unhandy.
Updating the database at each API request will make the requests pretty slow, hmm.
Options:
For now, i enabled a crontab that runs the following command every hour:
supervisortctl restart multifeeder
I think you can use https://apscheduler.readthedocs.io/en/latest/
to periodically come back and execute feedtools.update()
This is the Flask implementation
https://github.com/viniciuschiele/flask-apscheduler
Because this is a different thread, it wont intervene with your requests or need to reboot the entire application every hour.
That looks great!
Will try it out :)
It works great! The API is updated every 10 minutes now :).