Update main.py
Browse files
main.py
CHANGED
@@ -32,6 +32,7 @@ async def read_root():
|
|
32 |
|
33 |
@app.get("/start_model_trigger")
|
34 |
async def model_trigger(page:int):
|
|
|
35 |
page = str(page)
|
36 |
url = "https://api-ai-service.transexpress.lk/trigger_the_data_fecher?page="+page+"&paginate=10000"
|
37 |
print(url,page)
|
@@ -42,8 +43,8 @@ async def model_trigger(page:int):
|
|
42 |
}
|
43 |
|
44 |
response = requests.request("GET", url, headers=headers, data=payload)
|
45 |
-
|
46 |
print(response.text)
|
47 |
-
|
48 |
|
49 |
|
|
|
32 |
|
33 |
@app.get("/start_model_trigger")
|
34 |
async def model_trigger(page:int):
|
35 |
+
while True:
|
36 |
page = str(page)
|
37 |
url = "https://api-ai-service.transexpress.lk/trigger_the_data_fecher?page="+page+"&paginate=10000"
|
38 |
print(url,page)
|
|
|
43 |
}
|
44 |
|
45 |
response = requests.request("GET", url, headers=headers, data=payload)
|
46 |
+
page = int(page)+1
|
47 |
print(response.text)
|
48 |
+
return page
|
49 |
|
50 |
|