diff options
| author | Frederick Muriuki Muriithi | 2026-04-15 14:49:27 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-04-15 14:49:27 -0500 |
| commit | 2f9f153f566b9593f88e7bf6a0e3cd96c05346b4 (patch) | |
| tree | 376c63c785206c2b51fbd5035759028965ff80d3 /scripts | |
| parent | 5a8f1d5368e6a4119cd73955c0d0ede0f98cce42 (diff) | |
| download | gn-uploader-2f9f153f566b9593f88e7bf6a0e3cd96c05346b4.tar.gz | |
Move tracing details to INFO loglevel rather than debug.
We need to trace the auth process so as to help with debugging resource creation failures.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/load_phenotypes_to_db.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py index fedb9f8..0f69f96 100644 --- a/scripts/load_phenotypes_to_db.py +++ b/scripts/load_phenotypes_to_db.py @@ -204,6 +204,8 @@ def update_auth(# pylint: disable=[too-many-locals,too-many-positional-arguments dataset, xrefdata): """Grant the user access to their data.""" + logger.info("Updating authorisation for the data.") + logger.debug("Resource details for the authorisation: %s", resource_details) authserver, token = auth_details _tries = 0 _delay = 1 @@ -215,14 +217,14 @@ def update_auth(# pylint: disable=[too-many-locals,too-many-positional-arguments return urljoin(authserver, endpoint) def __fetch_user_details__(): - logger.debug("… Fetching user details") + logger.info("… Fetching user details") return mrequests.get( authserveruri("/auth/user/"), headers=headers ) def __link_data__(user): - logger.debug("… linking uploaded data to user's group") + logger.info("… linking uploaded data to user's group") return mrequests.post( authserveruri("/auth/data/link/phenotype"), headers=headers, @@ -245,7 +247,7 @@ def update_auth(# pylint: disable=[too-many-locals,too-many-positional-arguments }).then(lambda ld_results: (user, ld_results)) def __fetch_phenotype_category_details__(user, linkeddata): - logger.debug("… fetching phenotype category details") + logger.info("… fetching phenotype category details") return mrequests.get( authserveruri("/auth/resource/categories"), headers=headers @@ -258,7 +260,7 @@ def update_auth(# pylint: disable=[too-many-locals,too-many-positional-arguments ) def __create_resource__(user, linkeddata, category): - logger.debug("… creating authorisation resource object") + logger.info("… creating authorisation resource object") return mrequests.post( authserveruri("/auth/resource/create"), headers=headers, @@ -269,7 +271,7 @@ def update_auth(# pylint: disable=[too-many-locals,too-many-positional-arguments }).then(lambda cr_results: (user, linkeddata, cr_results)) def __attach_data_to_resource__(user, linkeddata, resource): - logger.debug("… attaching data to authorisation resource object") + logger.info("… attaching data to authorisation resource object") return mrequests.post( authserveruri("/auth/resource/data/link"), headers=headers, |
