Arafath10 commited on
Commit
b7fbcc6
1 Parent(s): e686c88

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -5
main.py CHANGED
@@ -31,8 +31,8 @@ async def read_root():
31
 
32
 
33
  @app.get("/start_model_trigger")
34
- async def model_trigger(page:str):
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)
@@ -45,8 +45,7 @@ async def model_trigger(page:str):
45
  response = requests.request("GET", url, headers=headers, data=payload)
46
 
47
  print(response.text)
48
-
49
- page = int(page)
50
- page = page + 1
51
 
52
 
 
31
 
32
 
33
  @app.get("/start_model_trigger")
34
+ async def model_trigger(page:int):
35
+ for page in range(page,page+2)
36
  page = str(page)
37
  url = "https://api-ai-service.transexpress.lk/trigger_the_data_fecher?page="+page+"&paginate=10000"
38
  print(url,page)
 
45
  response = requests.request("GET", url, headers=headers, data=payload)
46
 
47
  print(response.text)
48
+ print(page)
49
+ return page
 
50
 
51