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