|
19 | 19 | app_dir = pathmagic.setup()
|
20 | 20 |
|
21 | 21 | import depends
|
| 22 | + |
22 | 23 | depends.check_dependencies()
|
23 | 24 |
|
24 | 25 | import helper_sql
|
|
50 | 51 | addressGenerator, objectProcessor, singleCleaner, singleWorker, sqlThread)
|
51 | 52 |
|
52 | 53 |
|
53 |
| -def wait_until_sql_available(): |
54 |
| - while not helper_sql.sql_available: |
55 |
| - time.sleep(0.25) |
56 |
| - |
57 | 54 | def signal_handler(signum, frame):
|
58 | 55 | """Single handler for any signal sent to pybitmessage"""
|
59 | 56 | process = multiprocessing.current_process()
|
@@ -87,6 +84,7 @@ def signal_handler(signum, frame):
|
87 | 84 |
|
88 | 85 | class Main(object):
|
89 | 86 | """Main PyBitmessage class"""
|
| 87 | + |
90 | 88 | def start(self):
|
91 | 89 | """Start main application"""
|
92 | 90 | # pylint: disable=too-many-statements,too-many-branches,too-many-locals
|
@@ -183,12 +181,9 @@ def start(self):
|
183 | 181 | sqlLookup.daemon = False
|
184 | 182 | sqlLookup.start()
|
185 | 183 |
|
186 |
| - |
187 |
| - |
188 | 184 | Inventory() # init
|
189 | 185 |
|
190 | 186 | if state.enableObjProc: # Not needed if objproc is disabled
|
191 |
| - wait_until_sql_available() |
192 | 187 | shared.reloadMyAddressHashes()
|
193 | 188 | shared.reloadBroadcastSendersForWhichImWatching()
|
194 | 189 |
|
@@ -273,8 +268,8 @@ def start(self):
|
273 | 268 | while state.shutdown == 0:
|
274 | 269 | time.sleep(1)
|
275 | 270 | if (
|
276 |
| - state.testmode |
277 |
| - and time.time() - state.last_api_response >= 30 |
| 271 | + state.testmode |
| 272 | + and time.time() - state.last_api_response >= 30 |
278 | 273 | ):
|
279 | 274 | self.stop()
|
280 | 275 | elif not state.enableGUI:
|
@@ -397,7 +392,6 @@ def main():
|
397 | 392 | if __name__ == "__main__":
|
398 | 393 | main()
|
399 | 394 |
|
400 |
| - |
401 | 395 | # So far, the creation of and management of the Bitmessage protocol and this
|
402 | 396 | # client is a one-man operation. Bitcoin tips are quite appreciated.
|
403 | 397 | # 1H5XaDA6fYENLbknwZyjiYXYPQaFjjLX2u
|
0 commit comments