Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
add timeouts to schedulers; increase number of workers
Browse files
app.py
CHANGED
|
@@ -242,8 +242,8 @@ asyncio_executor = AsyncIOExecutor()
|
|
| 242 |
scheduler = BackgroundScheduler(executors={
|
| 243 |
'default': thread_pool_executor
|
| 244 |
})
|
| 245 |
-
scheduler.add_job(update_google_sheet, trigger='interval', minutes=1, max_instances=
|
| 246 |
-
scheduler.add_job(update_hub_stats, trigger='interval', minutes=1.5, max_instances=
|
| 247 |
scheduler.start()
|
| 248 |
#asyncio.get_event_loop().run_forever()
|
| 249 |
|
|
|
|
| 242 |
scheduler = BackgroundScheduler(executors={
|
| 243 |
'default': thread_pool_executor
|
| 244 |
})
|
| 245 |
+
scheduler.add_job(update_google_sheet, trigger='interval', minutes=1, max_instances=5, executor='default', timeout=300)
|
| 246 |
+
scheduler.add_job(update_hub_stats, trigger='interval', minutes=1.5, max_instances=5, executor='default', timeout=300)
|
| 247 |
scheduler.start()
|
| 248 |
#asyncio.get_event_loop().run_forever()
|
| 249 |
|