mirror of
https://github.com/FAUSheppy/skillbird
synced 2025-12-06 14:51:36 +01:00
implement skip
This commit is contained in:
@@ -10,11 +10,19 @@ if not len(sys.argv)>1:
|
|||||||
|
|
||||||
count = 31000
|
count = 31000
|
||||||
i = 0
|
i = 0
|
||||||
|
skip = 0
|
||||||
|
if len(sys.argv)>2:
|
||||||
|
skip = int(sys.argv[2])
|
||||||
|
|
||||||
start = dt.datetime.now()
|
start = dt.datetime.now()
|
||||||
url = "http://127.0.0.1:5000/submitt-round"
|
url = "http://127.0.0.1:5000/submitt-round"
|
||||||
|
|
||||||
with open(sys.argv[1], "r") as f:
|
with open(sys.argv[1], "r") as f:
|
||||||
for l in f:
|
for l in f:
|
||||||
|
if skip > 0:
|
||||||
|
skip -= 1;
|
||||||
|
i+=1
|
||||||
|
continue
|
||||||
requests.post(url, json=json.loads(l))
|
requests.post(url, json=json.loads(l))
|
||||||
cur = dt.datetime.now()
|
cur = dt.datetime.now()
|
||||||
i+=1
|
i+=1
|
||||||
|
|||||||
Reference in New Issue
Block a user