Skip to content

Instantly share code, notes, and snippets.

@MaxRV
MaxRV / reload_if_db_pool_is_dead.py
Created July 11, 2016 14:37
Tornado/Momoko/AutoReload::If the connection to the database Postgres distructed - momoko can not re-create the connection pool. To solve this problem you need to restart the application. To automate this process, I wrote a small script that use the built-in tornado update mechanism.
"""
Tornado/Momoko/AutoReload
=========================
Problem:
--------
If the connection to the database Postgres distructed - momoko can not re-create the connection pool.
To solve this problem you need to restart the application. To automate this process, I wrote a small script that use the built-in tornado update mechanism.
Solution: