新增实时数据采集脚本
This commit is contained in:
parent
06604cedda
commit
c272496904
@ -25,7 +25,8 @@ def get_event():
|
|||||||
|
|
||||||
|
|
||||||
def run_tasks():
|
def run_tasks():
|
||||||
args = get_event()
|
# args = get_event()
|
||||||
|
args = [1004, ]
|
||||||
pool = Pool(processes=cpu_count())
|
pool = Pool(processes=cpu_count())
|
||||||
pool.map(simple_work, args)
|
pool.map(simple_work, args)
|
||||||
pool.close()
|
pool.close()
|
||||||
@ -51,11 +52,10 @@ class CollectGameData():
|
|||||||
|
|
||||||
|
|
||||||
def simple_work(line):
|
def simple_work(line):
|
||||||
try:
|
times = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
|
||||||
times = sys.argv[1]
|
b_time = (datetime.date.today() - datetime.timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
except:
|
e_time = datetime.date.today().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
times = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
|
cc = CollectGameData(times, b_time, e_time)
|
||||||
cc = CollectGameData(times)
|
|
||||||
cc.workflow(line)
|
cc.workflow(line)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user