Skip to content

Commit

Permalink
fix line line lenght
Browse files Browse the repository at this point in the history
  • Loading branch information
chicco785 committed Nov 20, 2020
1 parent 5e233db commit 1197ec9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/translators/crate.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def setup(self):
# we need to think if we want to cache this information
# and save few msec for evey API call
self.db_version = self.get_db_version()
self.active_shards = EnvReader(log=logging.getLogger(__name__).debug).read(StrVar('CRATE_WAIT_ACTIV_SHARDS', '1'))
self.active_shards = EnvReader(log=logging.getLogger(__name__).debug)\
.read(StrVar('CRATE_WAIT_ACTIV_SHARDS', '1'))

major = int(self.db_version.split('.')[0])
if major <= 2:
Expand Down Expand Up @@ -173,7 +174,8 @@ def _create_data_table(self, table_name, table, fiware_service):
stmt = "create table if not exists {} ({}) with " \
"(\"number_of_replicas\" = '2-all', " \
"\"column_policy\" = 'strict', " \
"\"write.wait_for_active_shards\" = '{}')".format(table_name, columns, self.active_shards)
"\"write.wait_for_active_shards\" = '{}'" \
")".format(table_name, columns, self.active_shards)
self.cursor.execute(stmt)

def _update_data_table(self, table_name, new_columns, fiware_service):
Expand Down

0 comments on commit 1197ec9

Please sign in to comment.