rabin 7 years ago
parent
commit
b8ad673669
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cron.py

+ 2 - 1
cron.py

@@ -73,10 +73,11 @@ def mulQueue():
 
 		# 查看当前有没有正在执行的设备,如果有,不能继续执行了
 		device_model.oper = True
+		device_model.exp.nq('-1')
 		device_model.hardware_type = 3
 		device = device_model.select(type='fetchone')
 
-		if data and not data['operstate']:
+		if not device and data and not data['operstate']:
 			service.switch(data['device_id'], switch=data['value'], mul=False, queue=data['id'])
 			model.id = data['id']
 			model.update(operstate=True)