|
@@ -282,6 +282,7 @@ from media_api.kuaishou_material_video_report_hourly report
|
|
where report.stat_date between {start_time} and {end_time} and report.photo_id!=0
|
|
where report.stat_date between {start_time} and {end_time} and report.photo_id!=0
|
|
order by advertiser_id,photo_id ,stat_date,`hour` limit {num},20000""".format(
|
|
order by advertiser_id,photo_id ,stat_date,`hour` limit {num},20000""".format(
|
|
start_time=self.start_time, end_time=self.end_time, num=i * 20000)
|
|
start_time=self.start_time, end_time=self.end_time, num=i * 20000)
|
|
|
|
+ print(sql)
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
self.conn.commit()
|
|
self.conn.commit()
|
|
return 0
|
|
return 0
|
|
@@ -294,5 +295,7 @@ if __name__ == '__main__':
|
|
status = MateirialVideoHourlyReport().hourly_report()
|
|
status = MateirialVideoHourlyReport().hourly_report()
|
|
if status == 0:
|
|
if status == 0:
|
|
print("作业执行成功")
|
|
print("作业执行成功")
|
|
|
|
+ exit(0)
|
|
else:
|
|
else:
|
|
print("作业执行失败")
|
|
print("作业执行失败")
|
|
|
|
+ exit(-1)
|