diff --git a/beem/blockchain.py b/beem/blockchain.py index 49101453043d85b9db9a683b4d8f34c49baefb37..319a78602055e9e375489c04c2234056876418a0 100644 --- a/beem/blockchain.py +++ b/beem/blockchain.py @@ -180,7 +180,7 @@ class Blockchain(object): else: head_block = self.get_current_block_num() if threading and FUTURES_MODULE: - pool = ThreadPoolExecutor(2) + pool = ThreadPoolExecutor() latest_block = 0 for blocknum in range(start, head_block + 1, thread_num): futures = [] diff --git a/beemgrapheneapi/graphenerpc.py b/beemgrapheneapi/graphenerpc.py index bc31d0a42bfd1ac8325b0012d2032d3e9a220968..d08a5e6fab893ba0537114a6678420d9b0c84f31 100644 --- a/beemgrapheneapi/graphenerpc.py +++ b/beemgrapheneapi/graphenerpc.py @@ -217,7 +217,6 @@ class GrapheneRPC(object): except KeyboardInterrupt: raise except Exception as e: - print("error "+str(e)) log.critical("Error: {}n\n".format(str(e))) sleep_and_check_retries(self.num_retries, cnt, self.url) # retry diff --git a/examples/benchmark_beem.py b/examples/benchmark_beem.py index 84b63f9ecd5b02e9d2262d1a87468bceee98f485..ff1726ea392c4a4965e06e7c1169233f4c1cc553 100644 --- a/examples/benchmark_beem.py +++ b/examples/benchmark_beem.py @@ -17,33 +17,33 @@ logging.basicConfig(level=logging.INFO) if __name__ == "__main__": - node_setup = 2 + node_setup = 3 how_many_hours = 1 if node_setup == 0: stm = Steem(node="https://api.steemit.com", num_retries=10) - max_batch_size=None - threading=True - thread_num=8 + max_batch_size = None + threading = True + thread_num = 8 elif node_setup == 1: stm = Steem(node="https://api.steemitstage.com", num_retries=10) - max_batch_size=16 - threading=False - thread_num=8 + max_batch_size = None + threading = False + thread_num = 8 elif node_setup == 2: stm = Steem(node="https://api.steemitstage.com", num_retries=10) - max_batch_size=None - threading=True - thread_num=8 - elif node_setup == 3: + max_batch_size = None + threading = True + thread_num = 8 + elif node_setup == 3: stm = Steem(num_retries=10) - max_batch_size=None - threading=True - thread_num=8 + max_batch_size = None + threading = True + thread_num = 16 blockchain = Blockchain(steem_instance=stm) last_block_id = 19273700 last_block = Block(last_block_id, steem_instance=stm) startTime = datetime.now() - + stopTime = last_block.time() + timedelta(seconds=how_many_hours * 60 * 60) ltime = time.time() cnt = 0