Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFR-2283: Refactoring catalog process #418

Merged
merged 4 commits into from
Oct 28, 2024
Merged

SFR-2283: Refactoring catalog process #418

merged 4 commits into from
Oct 28, 2024

Conversation

kylevillegas93
Copy link
Contributor

@kylevillegas93 kylevillegas93 commented Oct 25, 2024

Description

  • Refactors catalog process
  • Moves away from while true loop
  • Converts to snake case

Testing

make test

Copy link
Contributor

@Apophenia Apophenia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think these changes look good!

logger.debug(e)
parsed_marc_xml = etree.fromstring(catalog_record.encode('utf-8'))
except Exception:
logger.exception(f'Unable to parse OCLC catalog MARC XML for OCLC number: {oclc_number}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth leaving in the debug level error so that we can see the way etree failed, if it fails? I suppose it's probably a rare case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will see the error in the exception log! However, I think if we are debugging locally we can add more debug logs. Since we set the log level as INFO for both QA and prod, these logs never get logged out.

@kylevillegas93 kylevillegas93 merged commit 138411f into main Oct 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants