Skip to content

Commit 159ceca

Browse files
committed
move function-level import to top-level
1 parent bb53742 commit 159ceca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

patchman/celery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from celery.signals import task_prerun
2121

2222
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'patchman.settings') # noqa
23+
from django import db # noqa
2324
from django.conf import settings # noqa
2425

2526
app = Celery('patchman')
@@ -36,5 +37,4 @@ def close_stale_connections(**kwargs):
3637
(MySQL) or 'server closed the connection unexpectedly' (PostgreSQL)
3738
when the DB server drops idle connections.
3839
"""
39-
from django import db
4040
db.close_old_connections()

0 commit comments

Comments
 (0)