|
@@ -217,10 +217,6 @@ def runSendRtspMsg_thread(UID, PWD, MSG):
|
|
|
print("back1----", back[1].decode()) # back是一个元祖,可以通过元祖取值的方式获取结果
|
|
|
return True
|
|
|
|
|
|
-def reqSendRtspMsg(self, url):
|
|
|
- logger = logging.getLogger('django')
|
|
|
- logger.info('--------请求接口--------')
|
|
|
- requests.get(url=url)
|
|
|
|
|
|
class oa2RtspStartView(TemplateView):
|
|
|
def post(self, request, *args, **kwargs):
|
|
@@ -329,11 +325,11 @@ class oa2RtspStartView(TemplateView):
|
|
|
if region == 'CN':
|
|
|
logger.info('------------国内发送推流指令---------------')
|
|
|
url = "http://52.83.252.41:7880/alexa/command?command={command}".format(command=command)
|
|
|
- # 多线程请求国内服务器调用pushtool
|
|
|
+ # 请求国内服务器调用pushtool
|
|
|
try:
|
|
|
- threading.Thread(target=reqSendRtspMsg, args=(url)).start()
|
|
|
+ requests.get(url=url, timeout=2)
|
|
|
except Exception as e:
|
|
|
- logger.info('异常: {}'.format(repr(e)))
|
|
|
+ logger.info('请求国内服务器调用pushtool异常: {}'.format(repr(e)))
|
|
|
else:
|
|
|
logger.info('------------国外发送推流指令---------------')
|
|
|
try:
|