diff options
author | Pami Ketolainen <pami.ketolainen@jollamobile.com> | 2014-03-13 23:29:10 +0200 |
---|---|---|
committer | Pami Ketolainen <pami.ketolainen@gmail.com> | 2014-03-17 17:53:45 +0200 |
commit | da71415b1a8cca290ceded7d4377b704b53a1e5a (patch) | |
tree | d3bebbcefaf05d5cbad94e4333b6cb3a21b02c3a | |
parent | 0d7addd505f1f3a3c02c9fdc6844183c4dca4445 (diff) | |
download | askbot-da71415b1a8cca290ceded7d4377b704b53a1e5a.tar.gz askbot-da71415b1a8cca290ceded7d4377b704b53a1e5a.tar.bz2 askbot-da71415b1a8cca290ceded7d4377b704b53a1e5a.zip |
Close cache after startup procedures
Same as with DB connection, the cache connection gets shared between child
processes in prefork mode if it isn't closed after startup procedures
-rw-r--r-- | askbot/startup_procedures.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 02fda329..f7c93964 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -1062,5 +1062,7 @@ def run(): except AskbotConfigError, error: print error sys.exit(1) - # close DB connection to prevent issues in prefork mode + # close DB and cache connections to prevent issues in prefork mode connection.close() + if hasattr(cache, 'close'): + cache.close() |