Explorar o código

creative_cnt 强制由numpy转化为int类型

liyuyi@c-top.com.cn %!s(int64=4) %!d(string=hai) anos
pai
achega
76f017b219
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ai_time_task_creative_handler.py

+ 1 - 1
ai_time_task_creative_handler.py

@@ -206,7 +206,7 @@ class AiCheckAndUpTOFullCreative(tornado.web.RequestHandler):
                    and creative_create_time >= '%s'
                    """ % (account_id, end_time, start_time)
             df = pd.read_sql(sql, engine)
-            creative_cnt = df['creative_cnt'].values[0]
+            creative_cnt = int(df['creative_cnt'].values[0])
             if creative_cnt >= 2000:
                 video_cnt = 0
             else: