Ver código fonte

测试告警时间

zhangbo 5 meses atrás
pai
commit
9615716b0c

+ 2 - 2
write_redis/alg_recsys_feature_08_vidh24predv2_redis.py

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