Explorar el Código

creative_cnt 强制由numpy转化为int类型

liyuyi@c-top.com.cn hace 4 años
padre
commit
76f017b219
Se han modificado 1 ficheros con 1 adiciones y 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: