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

Log post_index_creation exceptions #532

Merged
merged 1 commit into from
May 12, 2022
Merged

Log post_index_creation exceptions #532

merged 1 commit into from
May 12, 2022

Conversation

atrawog
Copy link
Collaborator

@atrawog atrawog commented May 12, 2022

Quetz allows to add plugins to modify the repodata info before they are written to disk or bucket.

This PR adds proper exceptions handling to log plugin exceptions and prevent cases where a plugin error causes no repodata be written to disk at all.

)
logger.debug("Finished post_index_creation for {sdir} of {channel_name}")
except Exception:
logger.exception("Exception post_index_creation:")
Copy link
Member

Choose a reason for hiding this comment

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

Is there something missing? exception isn't part of the logger? or is there some magic when usign logger.exception?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, OK, I looked it up, and there is some magic with logger.exception that I wasn't aware of :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes logging.exception provides some syntactic sugar to make exception logging a bit easier.

@wolfv wolfv added the enhancement New feature or request label May 12, 2022
@wolfv wolfv merged commit 5d3a032 into mamba-org:main May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants