新增实时数据采集脚本

This commit is contained in:
pengtao 2019-08-19 17:01:12 +08:00
parent e7a9d3ba27
commit 3e5bcc4e47

View File

@ -30,8 +30,8 @@ class RealData(GetFromTga):
and "#server_time" between timestamp'{self.b_time}' and timestamp'{self.e_time}'
GROUP BY ad_channel"""
out_new = self.get_data(sql_new_user)
out_login = self.get_data(sql_login_user)
out_new = self.tga.get_data(sql_new_user)
out_login = self.tga.get_data(sql_login_user)
data = {}
try:
for line in out_new:
@ -72,7 +72,7 @@ class RealData(GetFromTga):
and "#server_time" between timestamp'{self.b_time}' and timestamp'{self.e_time}'
group by
ad_channel"""
out = self.get_data(sql)
out = self.tga.get_data(sql)
data = {}
for line in out:
try: