django_cron中的close_old_connections

时间:2015-01-29 12:49:01

标签: python django

我开始了django_cron

python manage.py runcrons

然后按cntrl + c。

现在,当我尝试运行python manage.py runcrons时,我收到下一条消息:

  

python2.7 / site-packages / django_cron / management / commands / runcrons.py:41:removedInDjango18Warning:close_connection被close_old_connections取代。     close_connection()

如何解锁?

1 个答案:

答案 0 :(得分:0)

最终我发现了这个问题:

try:
    from django.db import close_old_connections as close_connection
except ImportError:
    from django.db import close_connection