We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Si este patrón se repite mucho, demás se podría hacer un context para manejarlo:
# ./utils.py from contextlib import asynccontextmanager @asynccontextmanager async def catch_exc(msg: str, *cleanup_fns: list[Callable]): try: yield except Exception: log.error(msg, code, exc_info=True) errors.add(code) for fn in cleanup_fns: fn() # Ejemplos with catch_exc(f"Cannot get requirements and syllabus for {code}", db_session.rollback): ...
No creo que esta versión que deje (y que no he probado) funcione para todos los casos, pero creo que se podría ver para simplificar el código 🤔
Originally posted by @benjavicente in #19 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Si este patrón se repite mucho, demás se podría hacer un context para manejarlo:
No creo que esta versión que deje (y que no he probado) funcione para todos los casos, pero creo que se podría ver para simplificar el código 🤔
Originally posted by @benjavicente in #19 (comment)
The text was updated successfully, but these errors were encountered: