Skip to content
Snippets Groups Projects
Commit e605e8b6 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Switch to after_commit to update the index

1. If there is a rollback, some objects could be updated in the
elasticsearch index but not in the database.
Updating the index after commit ensures this can't happen.

2. In after_flush, not all relationships are updated properly. We need
to retrieve the objects in the after_flush_postexec event.
It can't be done in the after_commit event because we can't emit SQL at
that point.

See https://groups.google.com/forum/#!topic/sqlalchemy/GdB5J8h7YEU

JIRA INFRA-595
parent 9012e34c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment