Created
January 17, 2014 18:31
-
-
Save AMeng/8478858 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
| class StatementQuery(SimpleStatement): | |
| def __init__(self, *args, **kwargs): | |
| cassandra_settings = getattr(settings, 'CASSANDRA', None) | |
| consistency = ConsistencyLevel.LOCAL_QUORUM | |
| if cassandra_settings and cassandra_settings.get('default', {}).get('DEBUG', False): | |
| consistency = ConsistencyLevel.ONE | |
| kwargs['consistency_level'] = kwargs.get('consistency_level', consistency) | |
| super(StatementQuery, self).__init__(*args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment