renyupeng hai 11 meses
pai
achega
313d704bcb

+ 4 - 3
Apietl/bytedance_etl/report/AdvertiserReport.py

@@ -288,12 +288,12 @@ from `media_api`.bytedance_advertiser_report_daily a
 where a.stat_datetime between {start_date} and {end_date}
   and a.advertiser_id = {account_id}
             """.format(start_date=start_date, end_date=end_date, account_id=account_id)
-            print(sql)
             TidbConn.upsert(conn=self.conn, sql_buff=sql)
             self.conn.commit()
             TidbConn.conn_close(conn=self.conn)
+            print(account_id, '头条账户日报执行完成')
         except Exception as e:
-            logging.error('失败详细信息:', repr(e))
+            logging.error(account_id, '执行失败')
 
     def hourly_report(self, account_id, start_date, end_date):
         try:
@@ -576,8 +576,9 @@ where a.stat_datetime between {start_date} and {end_date}
             TidbConn.upsert(conn=self.conn, sql_buff=sql)
             self.conn.commit()
             TidbConn.conn_close(conn=self.conn)
+            print(account_id, '头条账户时报执行完成')
         except Exception as e:
-            logging.error('失败详细信息:', repr(e))
+            logging.error(account_id, '执行失败')
 
     def handler(self, date_type, account_id, start_date, end_date):
         if date_type == "daily":

+ 4 - 4
Apietl/kwai_etl/report/AccountReport.py

@@ -441,12 +441,12 @@ cua.account_id IS NOT NULL
         where report.stat_date between {start_date} and {end_date}
         and report.advertiser_id={account_id}
             """.format(start_date=start_date, end_date=end_date, account_id=account_id)
-            print(sql)
             TidbConn.upsert(conn=self.conn, sql_buff=sql)
             self.conn.commit()
             TidbConn.conn_close(conn=self.conn)
+            print(account_id, '快手账户日报执行完成')
         except Exception as e:
-            logging.error('失败详细信息:', repr(e))
+            logging.error(account_id, '执行失败')
 
     def hourly_report(self, account_id, start_date, end_date):
         try:
@@ -873,12 +873,12 @@ cua.account_id IS NOT NULL
         where report.stat_date between {start_date} and {end_date}
         and  report.advertiser_id={account_id}
      """.format(start_date=start_date, end_date=end_date, account_id=account_id)
-            print(sql)
             TidbConn.upsert(conn=self.conn, sql_buff=sql)
             self.conn.commit()
             TidbConn.conn_close(conn=self.conn)
+            print(account_id, '快手账户时报执行完成')
         except Exception as e:
-            logging.error('失败详细信息:', repr(e))
+            logging.error(account_id, '执行失败')
 
     def handler(self, date_type, account_id, start_date, end_date):
         if date_type == "daily":