ck 4 lat temu
rodzic
commit
080445294f
2 zmienionych plików z 18 dodań i 5 usunięć
  1. 9 1
      handlers/GitHookHandler.py
  2. 9 4
      urls.py

+ 9 - 1
handlers/GitHookHandler.py

@@ -8,4 +8,12 @@ class DataCenerHook(BaseHandler):
     def post(self):
         val= os.popen('cd /home/qc/DataCenter && git pull')
         self.write('ok')
-        DingTalkUtils.send('DataCenter代码更新:\n '+val.read())
+        DingTalkUtils.send('DataCenter代码更新:\n '+val.read())
+
+
+class QcWebHook(BaseHandler):
+
+    def post(self):
+        val= os.popen('cd /root/QcWebServer && git pull')
+        self.write('ok')
+        DingTalkUtils.send('QcWebServer代码更新:\n '+val.read())

+ 9 - 4
urls.py

@@ -1,17 +1,22 @@
 from handlers.PitcherPanelHandler import*
 from handlers.ApiHandler import YgApiHandler
-from handlers.GitHookHandler import DataCenerHook
+from handlers.GitHookHandler import *
 
 
 urls = [
     (r'/data/pitcher_panel/channel', PitcherPanelChannel),  # 公众号汇总
-    (r'/data/pitcher_panel/daily', PitcherPanelDaily),# 日期汇总
+    (r'/data/pitcher_panel/daily', PitcherPanelDaily), # 日期汇总
     (r'/data/pitcher_panel/overview', PitcherPanelOverview), # 投手今天概况
-    (r'/api/get_yangguang_data',YgApiHandler), # 阳光订单回调接口
     (r'/data/channel_stat/overview',ChannelOverview), # 公众号广告投放数据
     (r'/data/channel_stat/again_order_trend',ChannelAgainOrderTrend), # 公众号复冲趋势
     (r'/data/channel_stat/active',ChannelActive), # 公众号激活数据
     (r'/data/channel_stat/order_trend',ChannelOrderTrend), # 公众号趋势
     (r'/data/channel_stat/channel',ChannelSummary),
-    (r'/api/git_hook/data_center',DataCenerHook)
+
+    # 外部接口
+    (r'/api/get_yangguang_data', YgApiHandler),  # 阳光订单回调接口
+
+    # web hook
+    (r'/api/git_hook/data_center',DataCenerHook),
+    (r'/api/git_hook/qc_web',QcWebHook),
 ]