how to update the Multifeeder? #5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 :).