diff --git a/nostr_dvm/dvm.py b/nostr_dvm/dvm.py index c91e57e..4b5a01b 100644 --- a/nostr_dvm/dvm.py +++ b/nostr_dvm/dvm.py @@ -52,7 +52,6 @@ class DVM: self.dvm_config = dvm_config self.admin_config = admin_config self.keys = Keys.parse(dvm_config.PRIVATE_KEY) - self.stop_thread = stop_thread relaylimits = RelayLimits.disable() opts = Options().relay_limits(relaylimits) #.difficulty(28) @@ -925,7 +924,7 @@ class DVM: try: - while not self.stop_thread: + while self.stop_thread is False: for dvm in self.dvm_config.SUPPORTED_DVMS: await dvm.schedule(self.dvm_config) @@ -966,3 +965,5 @@ class DVM: except BaseException: print("ende") + print("and now my watch has ended.") + diff --git a/nostr_dvm/interfaces/dvmtaskinterface.py b/nostr_dvm/interfaces/dvmtaskinterface.py index 9ec4538..db4c231 100644 --- a/nostr_dvm/interfaces/dvmtaskinterface.py +++ b/nostr_dvm/interfaces/dvmtaskinterface.py @@ -112,10 +112,10 @@ class DVMTaskInterface: pass def run(self): - + stop_threads = False try: - self.nostr_dvm_thread = Thread(target=self.DVM, args=[self.dvm_config, self.admin_config, lambda: self.stop_threads], daemon=False) + self.nostr_dvm_thread = Thread(target=self.DVM, args=[self.dvm_config, self.admin_config, lambda: stop_threads], daemon=False) self.nostr_dvm_thread.start() except BaseException as e: print("gone") diff --git a/setup.py b/setup.py index ca1e855..59a4f21 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = '1.0.8' +VERSION = '1.0.9' DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines' LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information') diff --git a/tests/discovery_on_this_day_and_olas.py b/tests/discovery_on_this_day_and_olas.py index 74c370c..af988fc 100644 --- a/tests/discovery_on_this_day_and_olas.py +++ b/tests/discovery_on_this_day_and_olas.py @@ -50,6 +50,7 @@ def build_example_gallery(name, identifier, admin_config, options, image, cost=0 dvm_config.UPDATE_DATABASE = update_db dvm_config.FIX_COST = cost dvm_config.CUSTOM_PROCESSING_MESSAGE = processing_msg + dvm_config.SEND_FEEDBACK_EVENTS = False dvm_config.DELETE_ANNOUNCEMENT_ON_SHUTDOWN = delete_nip_89_on_shutdown admin_config.LUD16 = dvm_config.LN_ADDRESS