pminervini commited on
Commit
81b5773
1 Parent(s): 12921e8
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -370,6 +370,16 @@ with demo:
370
  )
371
 
372
  scheduler = BackgroundScheduler()
 
373
  scheduler.add_job(restart_space, "interval", seconds=1800)
 
 
 
 
 
 
 
 
 
374
  scheduler.start()
375
  demo.queue(default_concurrency_limit=40).launch()
 
370
  )
371
 
372
  scheduler = BackgroundScheduler()
373
+
374
  scheduler.add_job(restart_space, "interval", seconds=1800)
375
+
376
+
377
+ def launch_backend():
378
+ import subprocess
379
+ _ = subprocess.run(["python", "backend-cli.py"])
380
+
381
+
382
+ scheduler.add_job(launch_backend, "interval", seconds=120)
383
+
384
  scheduler.start()
385
  demo.queue(default_concurrency_limit=40).launch()