Commit f0fbbc46 authored by hujun's avatar hujun

1

parent eb6d9e7d
...@@ -107,24 +107,27 @@ class DownFile: ...@@ -107,24 +107,27 @@ class DownFile:
self.local.url = self.ali_yun_sdk(item['call_time'], item['call_id']) self.local.url = self.ali_yun_sdk(item['call_time'], item['call_id'])
self.local.is_ok = 0 self.local.is_ok = 0
except Exception as result: except Exception as result:
self.lock.acquire() # self.lock.acquire()
self.log("exception 20s------------", str(result)) # self.log("exception 20s------------", str(result))
self.lock.release() # self.lock.release()
time.sleep(20) # time.sleep(20)
self.local.is_ok = 1 self.local.is_ok = 1
# 第二次尝试 # 第二次尝试
if self.local.is_ok == 1: if self.local.is_ok == 1:
try: try:
# self.local.count_sleep = self.local.count_sleep + 1 # 增加暂停计数 # self.local.count_sleep = self.local.count_sleep + 1 # 增加暂停计数
self.local.url = self.ali_yun_sdk(item['call_time'], item['call_id'])
except Exception as result:
self.lock.acquire() self.lock.acquire()
self.log( self.local.url = self.ali_yun_sdk(item['call_time'], item['call_id'])
"two exception error-----call_time=" + item['call_time'] + '&call_id=' + item['call_id'],
str(result))
self.lock.release() self.lock.release()
except Exception as result:
# self.lock.acquire()
# self.log(
# "two exception error-----call_time=" + item['call_time'] + '&call_id=' + item['call_id'],
# str(result))
# self.lock.release()
if len(self.local.url) == 0: if len(self.local.url) == 0:
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment