mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Ensure db connection is closed before script exits
This is required in django 1.4, but was closed automatically back in 1.2 when it was created.
This commit is contained in:
@ -9,6 +9,8 @@ sys.path.append(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '../
|
||||
import settings
|
||||
setup_environ(settings)
|
||||
|
||||
from django.db import connection
|
||||
|
||||
from util.moderation import get_all_pending_moderations
|
||||
from util.misc import send_template_mail
|
||||
|
||||
@ -22,3 +24,5 @@ if len(counts):
|
||||
{
|
||||
'items': counts,
|
||||
})
|
||||
|
||||
connection.close()
|
||||
|
Reference in New Issue
Block a user