|
@@ -123,9 +123,10 @@ def get_programme(db: Session):
|
|
|
|
|
|
|
|
|
def get_programme_status(url: str):
|
|
|
- print(url)
|
|
|
- res_header= send_util.get_jupyter_html(url)
|
|
|
- # 若为启动状态,则Server中包含Tornado,否则没有启动
|
|
|
- print(res_header)
|
|
|
- jupyter_status = 0 if res_header['Server'].find('Tornado') < 0 else 1
|
|
|
+ try:
|
|
|
+ res_header= send_util.get_jupyter_html(url)
|
|
|
+ # 若为启动状态,则Server中包含Tornado,否则没有启动
|
|
|
+ jupyter_status = 0 if res_header['Server'].find('Tornado') < 0 else 1
|
|
|
+ except Exception as e:
|
|
|
+ jupyter_status = 0
|
|
|
return jupyter_status
|