admin commited on
Commit
bda5f56
·
1 Parent(s): de43d1a
Files changed (1) hide show
  1. activate.py +5 -3
activate.py CHANGED
@@ -17,10 +17,12 @@ def get_space_status(repo_id: str):
17
  timeout=TIMEOUT,
18
  ).json()
19
 
20
- if not (response and response[0]["id"] == repo_id):
21
- return "SLEEPING" # 口袋罪
 
 
22
 
23
- return response[0]["runtime"]["stage"]
24
 
25
 
26
  def get_spaces(username: str):
 
17
  timeout=TIMEOUT,
18
  ).json()
19
 
20
+ if response:
21
+ for repo in response:
22
+ if repo["id"] == repo_id:
23
+ return repo["runtime"]["stage"]
24
 
25
+ return "SLEEPING"
26
 
27
 
28
  def get_spaces(username: str):