This commit is contained in:
pengtao 2019-09-30 14:19:54 +08:00
parent ad40982bc5
commit 900db3b5d2

View File

@ -9,7 +9,7 @@ import pdb
define_logger("/data/logs/get_newusers_days.log")
log = logging.getLogger(__name__)
DB = {'user': 'mytga', 'pswd': 'gzVwh4HGR68G', 'host': '10.10.3.5', 'db': 'games_report'}
DB = {'user': 'mytga', 'pswd': 'gzVwh4HGR68G', 'host': '10.10.3.5', 'db': 'test'}
mydb = MysqlBase(**DB)
table_name = "new_users_days"
@ -57,7 +57,8 @@ def main():
times = sys.argv[1]
else:
times = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
gameid = 2001
gameids = (1004, 1011, 2001)
for gameid in gameids:
channelid = 6001
data = get_data(times, gameid, channelid)
write2db(data, times, gameid, channelid)