From 2e749f64ef4a9505cd67ed0d4a8dc9e4f81a5a3a Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 25 Apr 2022 12:22:24 +0300 Subject: [PATCH] fixed global variable of backend --- docker-compose.yml | 2 +- planetmint/lib.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 378ad7b..5e2d8b8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,7 +43,7 @@ services: - ./pytest.ini:/usr/src/app/pytest.ini - ./tox.ini:/usr/src/app/tox.ini environment: - PLANETMINT_DATABASE_BACKEND: tarantooldb + PLANETMINT_DATABASE_BACKEND: tarantool_db PLANETMINT_DATABASE_HOST: tarantool PLANETMINT_DATABASE_PORT: 3303 PLANETMINT_SERVER_BIND: 0.0.0.0:9984 diff --git a/planetmint/lib.py b/planetmint/lib.py index 003af63..e3570de 100644 --- a/planetmint/lib.py +++ b/planetmint/lib.py @@ -78,6 +78,7 @@ class Planetmint(object): self.validation = BaseValidationRules # planetmint.backend.tarantool.connection_tarantool.connect(**Config().get()['database']) self.connection = connection if connection is not None else planetmint.backend.Connection() + print(f"PLANETMINT self.connection {self.connection} !!!!") def post_transaction(self, transaction, mode): """Submit a valid transaction to the mempool.""" @@ -457,6 +458,7 @@ class Planetmint(object): return backend.query.get_election(self.connection, election_id) def get_pre_commit_state(self): + print(f"CONNECTION {self.connection} !!!!!") return backend.query.get_pre_commit_state(self.connection) def store_pre_commit_state(self, state):