ck 4 年之前
父节点
当前提交
3ec27886fd
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      handlers/TaskHandler.py

+ 3 - 3
handlers/TaskHandler.py

@@ -5,9 +5,9 @@ from model import DingTalkUtils
 
 class SrcBookInfo(BaseHandler):
     def get(self):
-        val= os.system('source ~/.bashrc && /root/.local/share/virtualenvs/DataCenter-EjFsiCkN/bin/python /root/DataCenter/app/etl/src/src_book_info.py')
-        self.write('ok' if val==0 else 'fail')
-        # DingTalkUtils.send('DataCenter任务刷新:'+val.read())
+        val= os.popen('source ~/.bashrc && /root/.local/share/virtualenvs/DataCenter-EjFsiCkN/bin/python /root/DataCenter/app/etl/src/src_book_info.py')
+        self.write('ok')
+        DingTalkUtils.send('DataCenter任务刷新:'+val.read())