Skip to content

Commit

Permalink
add more tries
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaGrandhay committed Oct 2, 2024
1 parent f07cdae commit 2e10116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patstat/p08b_outils_inpi_adress_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def person_ref(bs, pb_n, ptdoc):
return df


@retry(tries=3, delay=5, backoff=5)
@retry(tries=20, delay=5, backoff=5)
def get_address(df_per: pd.DataFrame) -> pd.DataFrame:
df_per.loc[df_per["country"].isin(["XX", "FR", ""]), "f"] = df_per.loc[
df_per["country"].isin(["XX", "FR", ""]), "postcode"].str.replace(r"^F-?\d+", "present", regex=True)
Expand Down Expand Up @@ -659,7 +659,7 @@ def get_address(df_per: pd.DataFrame) -> pd.DataFrame:
return df_adm_final


@retry(tries=3, delay=5, backoff=5)
@retry(tries=20, delay=5, backoff=5)
def ad_missing(miss_fr2: pd.DataFrame) -> pd.DataFrame:
logger = get_logger(threading.current_thread().name)
logger.info("start query missing address")
Expand Down Expand Up @@ -1082,7 +1082,7 @@ def read_xml(df_fles):
return ddresses


@retry(tries=3, delay=5, backoff=5)
@retry(tries=10, delay=5, backoff=5)
def req_paysage(df_pay: pd.DataFrame) -> pd.DataFrame:
logger = get_logger(threading.current_thread().name)
logger.info("start query paysage")
Expand Down

0 comments on commit 2e10116

Please sign in to comment.