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

Outcome syncs failing #10

Open
bennettscience opened this issue Feb 4, 2020 · 1 comment
Open

Outcome syncs failing #10

bennettscience opened this issue Feb 4, 2020 · 1 comment
Labels

Comments

@bennettscience
Copy link
Owner

@bennettscience bennettscience commented Feb 4, 2020

Some student IDs fail on an Outcome grade sync.

Sentry message:

(sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back
[SQL: SELECT outcome.id AS outcome_id_1, outcome.outcome_id AS outcome_outcome_id, outcome.title AS outcome_title, outcome.course_id AS outcome_course_id 
FROM outcome 
WHERE outcome.outcome_id = %(outcome_id_1)s AND outcome.course_id = %(course_id_1)s 
 LIMIT %(param_1)s]
[parameters: [{}]]
@bennettscience

This comment has been minimized.

Copy link
Owner Author

@bennettscience bennettscience commented Feb 4, 2020

May be related to MySQL sessions closing during long-running processes. It may help to manually close db.session after the initial query in each loop iteration to find aligned outcomes:

https://github.com/bennettscience/canvas-learning-mastery/blob/master/app/outcomes.py#L126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.