liqian 2 years ago
parent
commit
575667e31c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app.py

+ 6 - 0
app.py

@@ -1,3 +1,5 @@
+import random
+
 from gevent import monkey
 monkey.patch_all()
 
@@ -36,13 +38,17 @@ def health_check():
 @app.route('/applet/video/homepage/recommend', methods=['GET', 'POST'])
 def homepage_recommend():
     start_time = time.time()
+    in_homepage = start_time + random.randint(0, 100)
+    log_.info({"in_homepage": in_homepage})
     try:
+        log_.info({'request_headers': request.headers})
         request_data = json.loads(request.get_data())
         request_id = request_data.get('requestId')
         log_.info({
             'logTimestamp': int(time.time() * 1000),
             'request_id': request_id,
             'text': 'in homepage_recommend',
+            "in_homepage": in_homepage,
             'executeTime': (time.time() - start_time) * 1000
         })
         mid = request_data.get('mid')