|
@@ -167,7 +167,7 @@ def main():
|
|
|
begin_ts = int(time.time())
|
|
|
table_data_cnt = 0
|
|
|
while run_flag:
|
|
|
- if int(time.time()) - begin_ts >= 60 * 1:
|
|
|
+ if int(time.time()) - begin_ts >= 60 * 40:
|
|
|
log_.info("等待上游数据超过40分钟了,认为失败退出:过了{}秒。".format(int(time.time()) - begin_ts))
|
|
|
sys.exit(1)
|
|
|
table_data_cnt = check_data(project, table, date, hour, mm)
|
|
@@ -190,7 +190,7 @@ if __name__ == '__main__':
|
|
|
process = Process(target=main)
|
|
|
process.start()
|
|
|
# 等待子进程完成或超时
|
|
|
- timeout = 10
|
|
|
+ timeout = 3600
|
|
|
process.join(timeout=timeout) # 设置超时为3600秒(1小时)
|
|
|
if process.is_alive():
|
|
|
print("脚本执行时间超过1小时,执行失败,经过了{}秒。".format(timeout))
|