Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -266,7 +266,7 @@ def keep_alive():
|
|
266 |
if __name__ == '__main__':
|
267 |
scheduler = BackgroundScheduler()
|
268 |
# 设置定时任务,每 10 分钟执行一次 keep_alive 函数
|
269 |
-
scheduler.add_job(keep_alive, 'interval',
|
270 |
# 启动调度器
|
271 |
scheduler.start()
|
272 |
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
|
|
|
266 |
if __name__ == '__main__':
|
267 |
scheduler = BackgroundScheduler()
|
268 |
# 设置定时任务,每 10 分钟执行一次 keep_alive 函数
|
269 |
+
scheduler.add_job(keep_alive, 'interval', hours = 12)
|
270 |
# 启动调度器
|
271 |
scheduler.start()
|
272 |
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
|