Reputation: 16612
DISCLAIMER: Tried to Google, came up with nothing, I admin I may have googled poorly but I'm out of ideas.
I have a web.py application, I need to run some database maintenance tasks periodically, and I'd like to do it with threads so the Python application is completely self-contained. My question is: what kind of precautions, if any, do I have to make in order to do this? The plan is to create a thread before calling app = web.application(urls, globals())
/ app.run()
and have it run operations using the database object I created previously with web.database()
. Do I need to create a second database object and use that one within my background thread code?
Python is 3.9.18; web.py is 0.62.
Upvotes: 0
Views: 29