Python: running process in the background with ability to kill them
I need to constantly load a number of data feeds. The data feeds can take
20-30 seconds to load. I know what feeds to load by checking a MySQL
database every hour.
I could have up to 20 feeds to load at the same time. It's important that
non of the feeds block each other as I need to refresh them constantly.
When I no longer need to load the feeds the database that I'm reading gets
updated and I thus need to stop loading the feed which I would like to do
from my main program so I don't need multiple connections to the db.
I'm aware that I could probably do this using this using threading,
subprocess or gevents. I wanted to ask if any of these would be best.
Thanks
No comments:
Post a Comment