Explorar el Código

优化定时器

peng hace 1 año
padre
commit
7de7bf534e
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      Object/ApschedulerObject.py

+ 1 - 0
Object/ApschedulerObject.py

@@ -10,6 +10,7 @@ class ApschedulerObject:
     def __init__(self):
         self.scheduler = BackgroundScheduler()
         self.scheduler.add_jobstore(DjangoJobStore(), 'default')
+        self.scheduler.configure({'process': 1, 'thread': 1})
 
     @staticmethod
     def auto_hello():  # 任务