eduagarcia commited on
Commit
39b7a5d
1 Parent(s): 94177ff

wrap update_dynamic_files

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -501,9 +501,16 @@ with demo:
501
  show_copy_button=True,
502
  )
503
  """
 
 
 
 
 
 
 
504
  scheduler = BackgroundScheduler()
505
  scheduler.add_job(restart_space, "interval", seconds=10800) # restarted every 3h
506
- scheduler.add_job(update_dynamic_files, "cron", minute=30) # launched every hour on the hour
507
  scheduler.start()
508
 
509
  demo.queue(default_concurrency_limit=40).launch()
 
501
  show_copy_button=True,
502
  )
503
  """
504
+
505
+ def update_dynamic_files_wrapper():
506
+ try:
507
+ return update_dynamic_files()
508
+ except Exception as e:
509
+ print(f"Error updating dynamic files: {e}")
510
+
511
  scheduler = BackgroundScheduler()
512
  scheduler.add_job(restart_space, "interval", seconds=10800) # restarted every 3h
513
+ scheduler.add_job(update_dynamic_files_wrapper, "cron", minute=30) # launched every hour on the hour
514
  scheduler.start()
515
 
516
  demo.queue(default_concurrency_limit=40).launch()