add workflow partner1site,dev
This commit is contained in:
parent
a96bafb991
commit
ad73fba998
|
@ -80,7 +80,7 @@ class Partner1SiteClient:
|
||||||
"page": page_num
|
"page": page_num
|
||||||
})
|
})
|
||||||
|
|
||||||
resp = requests.get(base_url, params=params_with_paging, timeout=30)
|
resp = requests.get(base_url, params=params_with_paging, timeout=120)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
data_json = resp.json()
|
data_json = resp.json()
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ def main():
|
||||||
|
|
||||||
data = client.fetch_all_pages(
|
data = client.fetch_all_pages(
|
||||||
api_name="pos_datas",
|
api_name="pos_datas",
|
||||||
params={'startPosInsertDate':'2000-1-1',} # 拉全量,若有默认时间限制可改成 {"startInsertDate":"2000-01-01","endInsertDate":get_previous_date(0)}
|
params={'startPosInsertDate':get_previous_date(7),} # 拉全量,若有默认时间限制可改成 {"startInsertDate":"2000-01-01","endInsertDate":get_previous_date(0)}
|
||||||
)
|
)
|
||||||
save_json_to_pg(data, API_ID)
|
save_json_to_pg(data, API_ID)
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class Partner1SiteClient:
|
||||||
"page": page_num
|
"page": page_num
|
||||||
})
|
})
|
||||||
|
|
||||||
resp = requests.get(base_url, params=params_with_paging, timeout=30)
|
resp = requests.get(base_url, params=params_with_paging, timeout=120)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
data_json = resp.json()
|
data_json = resp.json()
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ def main():
|
||||||
|
|
||||||
data = client.fetch_all_pages(
|
data = client.fetch_all_pages(
|
||||||
api_name="visits",
|
api_name="visits",
|
||||||
params={'startInsertDate':'2000-1-1'} # 拉全量,若有默认时间限制可改成 {"startInsertDate":"2000-01-01","endInsertDate":get_previous_date(0)}
|
params={'startInsertDate':get_previous_date(7),} # 拉全量,若有默认时间限制可改成 {"startInsertDate":"2000-01-01","endInsertDate":get_previous_date(0)}
|
||||||
)
|
)
|
||||||
save_json_to_pg(data, API_ID)
|
save_json_to_pg(data, API_ID)
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Partner1SiteClient:
|
||||||
"page": page_num
|
"page": page_num
|
||||||
})
|
})
|
||||||
|
|
||||||
resp = requests.get(base_url, params=params_with_paging, timeout=30)
|
resp = requests.get(base_url, params=params_with_paging, timeout=120)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
data_json = resp.json()
|
data_json = resp.json()
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class Partner1SiteClient:
|
||||||
"page": page_num
|
"page": page_num
|
||||||
})
|
})
|
||||||
|
|
||||||
resp = requests.get(base_url, params=params_with_paging, timeout=30)
|
resp = requests.get(base_url, params=params_with_paging, timeout=120)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
data_json = resp.json()
|
data_json = resp.json()
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ def main():
|
||||||
|
|
||||||
data = client.fetch_all_pages(
|
data = client.fetch_all_pages(
|
||||||
api_name="reports",
|
api_name="reports",
|
||||||
params={'startApplyDate':'2000-1-1'} # 拉全量,若有默认时间限制可改成 {"startInsertDate":"2000-01-01","endInsertDate":get_previous_date(0)}
|
params={'startApplyDate':get_previous_date(7)} # 拉全量,若有默认时间限制可改成 {"startInsertDate":"2000-01-01","endInsertDate":get_previous_date(0)}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue