Change sqkserver log level in docker (#210)

This commit is contained in:
Jonathan Zernik 2020-08-02 23:11:06 -07:00 committed by GitHub
parent 6ed3ad7d2f
commit 087e68eb0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

View file

@ -14,5 +14,5 @@ export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
exec runsqueakserver \
--config config.ini \
--log-level DEBUG \
--log-level INFO \
run-server

View file

@ -37,10 +37,10 @@ class BitcoinBlockchainClient(BlockchainClient):
self.url, data=json.dumps(payload), headers=self.headers,
).json()
logger.info("Got response for get_block_count: {}".format(response))
logger.debug("Got response for get_block_count: {}".format(response))
result = response["result"]
block_count = int(result)
logger.info("Got block_count: {}".format(block_count))
logger.debug("Got block_count: {}".format(block_count))
return block_count
def get_block_hash(self, block_height: int) -> Optional[str]:
@ -54,10 +54,10 @@ class BitcoinBlockchainClient(BlockchainClient):
self.url, data=json.dumps(payload), headers=self.headers,
).json()
logger.info("Got response for get_block_hash: {}".format(response))
logger.debug("Got response for get_block_hash: {}".format(response))
result = response["result"]
block_hash = result
logger.info("Got block_hash: {}".format(block_hash))
logger.debug("Got block_hash: {}".format(block_hash))
return block_hash
# def get_best_block_hash(self) -> Optional[bytes]:
@ -86,7 +86,7 @@ class BitcoinBlockchainClient(BlockchainClient):
self.url, data=json.dumps(payload), headers=self.headers,
).json()
logger.info("Got response for get_block_header: {}".format(response))
logger.debug("Got response for get_block_header: {}".format(response))
result = response["result"]
logger.info("Got block_header: {}".format(result))
logger.debug("Got block_header: {}".format(result))
return result

View file

@ -32,7 +32,8 @@ class SqueakSubscriptionDownloader:
return
for subscription in subscriptions:
logger.info("Syncing subscription: {} with current block: {}".format(subscription, block_height))
if subscription.subscribed:
logger.info("Syncing subscription: {} with current block: {}".format(subscription, block_height))
def start_running(self):
threading.Timer(self.update_interval_s, self.start_running).start()