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

Bugfix/syncing targets race condition #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

crpellegrino
Copy link
Collaborator

This PR addresses a potential race condition when a new Target is added to SNEx1 while the sync_databases.py script is running. In the past this has thrown exceptions when the script attempts to sync a newly-created TargetName to a Target that is not yet in the SNEx2 database.

To fix this issue, the script now checks whether the associated Target object exists in the SNEx2 database before ingesting a new TargetName. If not found, the script will create the Target before continuing to sync associated name and extra values.

These changes should be ready to merge--let me know when they are and I'll keep an eye on the syncing process just to be sure everything is working as intended.

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.

1 participant