Skip to content

Commit

Permalink
Change flush to commit for other db sessions to query (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
jowlee committed Oct 23, 2020
1 parent e079f39 commit 2ddbc1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discovery-provider/src/tasks/index.py
Expand Up @@ -230,7 +230,7 @@ def index_blocks(self, db, blocks_list):
# social state changes are not factored in since they don't affect track_lexeme_dict
# write out all pending transactions to db before refreshing view
track_lexeme_state_changed = (user_state_changed or track_state_changed)
session.flush()
session.commit()
if user_state_changed:
session.execute("REFRESH MATERIALIZED VIEW user_lexeme_dict")
if user_ids:
Expand Down

0 comments on commit 2ddbc1d

Please sign in to comment.