diff --git a/django_replicated/dbchecker.py b/django_replicated/dbchecker.py index 5d8ce72..50a3411 100644 --- a/django_replicated/dbchecker.py +++ b/django_replicated/dbchecker.py @@ -40,8 +40,8 @@ def is_alive(connection): connection.connection.ping() else: log.debug('Get cursor for db: %s', connection.alias) - with connection.cursor(): - pass + with connection.cursor() as cur: + cur.execute("SELECT 1") return True