Created
January 11, 2016 22:20
-
-
Save mlowicki/0b9f275ca31ba8a24c2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| statement = ( | |
| "UPDATE {db_name}.user_store USING TTL %s SET clear_pending = True" | |
| " WHERE user_id = %s IF EXISTS" | |
| ).format(db_name=settings.DATABASES['default']['NAME']) | |
| execute_statement(statement, (CLEAR_PENDING_TTL, user_id)) | |
| ... | |
| def execute_statement(statement, params, **kw): | |
| session = connection.connection.session | |
| return session.execute(statement, params, **kw) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment