Skip to content

Commit

Permalink
time sleep added
Browse files Browse the repository at this point in the history
  • Loading branch information
joofio committed Oct 4, 2024
1 parent cca8317 commit 6b90728
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

focusing_metrics.log

logs/
logs/

data.json
1 change: 0 additions & 1 deletion data.json

This file was deleted.

17 changes: 13 additions & 4 deletions mainv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def chek_preprocessor_data(BUNDLES, LENSES, PATIENT_IDS, BASE_URL):
lens=lens,
pid=pid,
)
time.sleep(2)
return 1


Expand Down Expand Up @@ -251,6 +252,8 @@ def chek_lenses_foralreadypreprocess_data(BUNDLES, LENSES, PATIENT_IDS, BASE_URL
lens=lens,
pid=pid,
)
time.sleep(2)

return 1


Expand All @@ -276,6 +279,8 @@ def chek_all_lenses_data(BUNDLES, PATIENT_IDS, BASE_URL):
lens="all",
pid=pid,
)
time.sleep(2)

return 1


Expand All @@ -301,6 +306,8 @@ def chek_all_preprocess_data(BUNDLES, PATIENT_IDS, BASE_URL):
lens="all",
pid=pid,
)
time.sleep(2)

return 1


Expand Down Expand Up @@ -336,6 +343,8 @@ def chek_all_prpcessor_with_post_data(BUNDLES, PATIENT_IDS, BASE_URL):
lens="all",
pid=pid,
)
time.sleep(2)

return 1


Expand Down Expand Up @@ -390,27 +399,27 @@ def main():
chek_preprocessor_data(BUNDLES, LENSES, PATIENT_IDS, BASE_URL)
except Exception as err:
logger.debug(f"Error on function chek_preprocessor_data -> {err}")
time.sleep(1)
time.sleep(10)
try:
chek_all_lenses_data(BUNDLES, PATIENT_IDS, BASE_URL)
except Exception as err:
logger.debug(f"Error on function chek_all_lenses_data -> {err}")

time.sleep(1)
time.sleep(10)
try:
chek_all_preprocess_data(BUNDLES, PATIENT_IDS, BASE_URL)
except Exception as err:
logger.debug(f"Error on function chek_all_preprocess_data -> {err}")

time.sleep(1)
time.sleep(10)
try:
chek_all_prpcessor_with_post_data(BUNDLES, PATIENT_IDS, BASE_URL)
except Exception as err:
logger.debug(
f"Error on function chek_all_prpcessor_with_post_data -> {err}"
)

time.sleep(1)
time.sleep(10)
try:
chek_lenses_foralreadypreprocess_data(
PREPROCBUNDLES, LENSES, PATIENT_IDS, BASE_URL
Expand Down

0 comments on commit 6b90728

Please sign in to comment.