-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove pugsql #48
base: main
Are you sure you want to change the base?
Remove pugsql #48
Conversation
experts_etl/oit_to_edw/person.py
Outdated
connection.commit() | ||
except: | ||
connection.rollback() | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're able to roll back this transaction, we can recover from this exception. We don't need to raise. As we do elsewhere in this project, let's log an error instead, something like this:
except Exception as e:
connection.rollback()
formatted_exception = loggers.format_exception(e)
experts_etl_logger.error(
f'exception encountered during updating pure_sync_data tables: {formatted_exception}'
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the raise and implemented exception error logging as noted above.
This pull request is dependent on experts_dw having expsql.py. I don't think we can even think about merging until we test the Cx Oracle functionality.