033c0499 by 周伟奇

fix db connection

1 parent 0968153b
......@@ -11,6 +11,7 @@ import requests
import traceback
from collections import Counter
from datetime import datetime, date
from django import db
from django.utils import timezone
from django.core.management import BaseCommand
from multiprocessing import Process, Queue, Manager, Lock
......@@ -731,6 +732,7 @@ class Command(BaseCommand, LoggerMixin):
# EDMS异常:下载异常-->回队列-->邮件;上传异常-->重新上传队列-->邮件
# 算法异常:第一道异常-->识别失败-->邮件;第二道异常-->识别失败-->邮件
def handle(self, *args, **kwargs):
db.close_old_connections()
lock = Lock()
with Manager() as manager:
error_list = manager.list()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!