batanus commited on
Commit
d10dc70
·
verified ·
1 Parent(s): c04fc17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -23,18 +23,18 @@ def index():
23
  @app.route('/api/restart_if_needed', methods=['GET'])
24
  def restart_if_needed():
25
  try:
26
- bibleRuntime = api.get_space_runtime("batanus/bible")
27
  # logging.info(f"bible: {openaiRuntime.stage}")
28
- if bibleRuntime.stage != "RUNNING":
29
- logging.info(f"bible - Restarted")
30
- newBibleRuntime = api.restart_space("batanus/bible")
31
 
32
 
33
- gpchatRuntime = api.get_space_runtime("batanus/gpchat")
34
  # logging.info(f"gpchat: {gpchatRuntime.stage}")
35
- if gpchatRuntime.stage != "RUNNING":
36
- logging.info(f"gpchat - Restarted")
37
- newGpchatRuntime = api.restart_space("batanus/gpchat")
38
 
39
 
40
  sslerRuntime = api.get_space_runtime("batanus/ssler")
@@ -43,11 +43,11 @@ def restart_if_needed():
43
  logging.info(f"ssler - Restarted")
44
  newSslerRuntime = api.restart_space("batanus/ssler")
45
 
46
- anichatRuntime = api.get_space_runtime("batanus/anichat")
47
  # logging.info(f"anichat: {openaiRuntime.stage}")
48
- if anichatRuntime.stage != "RUNNING":
49
- logging.info(f"anichat - Restarted")
50
- newAnichatRuntime = api.restart_space("batanus/anichat")
51
 
52
 
53
  return '', 204
 
23
  @app.route('/api/restart_if_needed', methods=['GET'])
24
  def restart_if_needed():
25
  try:
26
+ # bibleRuntime = api.get_space_runtime("batanus/bible")
27
  # logging.info(f"bible: {openaiRuntime.stage}")
28
+ # if bibleRuntime.stage != "RUNNING":
29
+ # logging.info(f"bible - Restarted")
30
+ # newBibleRuntime = api.restart_space("batanus/bible")
31
 
32
 
33
+ # gpchatRuntime = api.get_space_runtime("batanus/gpchat")
34
  # logging.info(f"gpchat: {gpchatRuntime.stage}")
35
+ # if gpchatRuntime.stage != "RUNNING":
36
+ # logging.info(f"gpchat - Restarted")
37
+ # newGpchatRuntime = api.restart_space("batanus/gpchat")
38
 
39
 
40
  sslerRuntime = api.get_space_runtime("batanus/ssler")
 
43
  logging.info(f"ssler - Restarted")
44
  newSslerRuntime = api.restart_space("batanus/ssler")
45
 
46
+ # anichatRuntime = api.get_space_runtime("batanus/anichat")
47
  # logging.info(f"anichat: {openaiRuntime.stage}")
48
+ # if anichatRuntime.stage != "RUNNING":
49
+ # logging.info(f"anichat - Restarted")
50
+ # newAnichatRuntime = api.restart_space("batanus/anichat")
51
 
52
 
53
  return '', 204