Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

locky 2 yıl önce
ebeveyn
işleme
c08a6303fb
2 değiştirilmiş dosya ile 3 ekleme ve 4 silme
  1. 2 3
      controller/deviceStatus.py
  2. 1 1
      controller/index.py

+ 2 - 3
controller/deviceStatus.py

@@ -541,10 +541,9 @@ class deviceStatus(TemplateView):
         logger.info('userID: {}, UID: {}'.format(userID, UID))
         if not all([UID, userID]):
             return JsonResponse({'code': 111, 'msg': 'fail'})
-        skill_name = 'zosi smart'
         try:
-            alexAuth = AlexaAuthModel.objects.filter(userID=userID, skill_name=skill_name). \
-                values('expiresTime', 'refresh_token', 'access_token', 'alexa_region')
+            alexAuth = AlexaAuthModel.objects.filter(userID=userID). \
+                values('expiresTime', 'refresh_token', 'access_token', 'alexa_region', 'skill_name')
             if not alexAuth.exists():
                 logger.info('UID为 {} 的用户不存在'.format(UID))
                 return JsonResponse({'code': 102, 'msg': 'not found user'})

+ 1 - 1
controller/index.py

@@ -392,7 +392,7 @@ class oa2RtspStartView(TemplateView):
             logger.info('------------国外发送推流指令---------------')
             try:
                 back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE). \
-                    communicate(timeout=2)
+                    communicate(timeout=10)
                 logger.info('back: {}'.format(str(back[0].decode()) + str(back[1].decode())))
             except Exception as e:
                 self.runSendRtspMsg(logger, 'CN', command)  # 调用失败时尝试用国内的发送