ck 4 years ago
parent
commit
bb94140f1d
1 changed files with 6 additions and 2 deletions
  1. 6 2
      handlers/TaskHandler.py

+ 6 - 2
handlers/TaskHandler.py

@@ -5,10 +5,14 @@ import subprocess
 
 class SrcBookInfo(BaseHandler):
     def get(self):
-        p = subprocess.Popen('source ~/.bashrc && /root/.local/share/virtualenvs/DataCenter-EjFsiCkN/bin/python /root/DataCenter/app/etl/src/src_book_info.py',shell=True)
-        p.wait()
+        # p = subprocess.Popen('source ~/.bashrc && /root/.local/share/virtualenvs/DataCenter-EjFsiCkN/bin/python /root/DataCenter/app/etl/src/src_book_info.py',shell=True)
+        # p.wait()
+        a = yield self.run()
 
 
+    def run(self):
+        os.system('source ~/.bashrc && /root/.local/share/virtualenvs/DataCenter-EjFsiCkN/bin/python /root/DataCenter/app/etl/src/src_book_info.py')
+