From e084d7f53c895695db08e4a592d17eb29df50527 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sun, 3 Jan 2021 11:14:27 +0100 Subject: [PATCH] `objectProcessor` waits for `sqlThread` ready - fixes #1702 --- src/class_objectProcessor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/class_objectProcessor.py b/src/class_objectProcessor.py index 97242a7f..cd38b5cc 100644 --- a/src/class_objectProcessor.py +++ b/src/class_objectProcessor.py @@ -29,7 +29,7 @@ from addresses import ( ) from bmconfigparser import BMConfigParser from fallback import RIPEMD160Hash -from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery +from helper_sql import sql_ready, SqlBulkExecute, sqlExecute, sqlQuery from network import bmproto, knownnodes from network.node import Peer # pylint: disable=too-many-locals, too-many-return-statements, too-many-branches, too-many-statements @@ -50,6 +50,7 @@ class objectProcessor(threading.Thread): # objectProcessorQueue. Assuming that Bitmessage wasn't closed # forcefully, it should have saved the data in the queue into the # objectprocessorqueue table. Let's pull it out. + sql_ready.wait() queryreturn = sqlQuery( '''SELECT objecttype, data FROM objectprocessorqueue''') for row in queryreturn: