This commit is contained in:
dbth 2025-01-02 17:20:04 +01:00
parent fc2fa91be8
commit 7b55e279ac
4 changed files with 7 additions and 5 deletions

View File

@ -52,7 +52,6 @@ class DVM:
self.dvm_config = dvm_config self.dvm_config = dvm_config
self.admin_config = admin_config self.admin_config = admin_config
self.keys = Keys.parse(dvm_config.PRIVATE_KEY) self.keys = Keys.parse(dvm_config.PRIVATE_KEY)
self.stop_thread = stop_thread
relaylimits = RelayLimits.disable() relaylimits = RelayLimits.disable()
opts = Options().relay_limits(relaylimits) #.difficulty(28) opts = Options().relay_limits(relaylimits) #.difficulty(28)
@ -925,7 +924,7 @@ class DVM:
try: try:
while not self.stop_thread: while self.stop_thread is False:
for dvm in self.dvm_config.SUPPORTED_DVMS: for dvm in self.dvm_config.SUPPORTED_DVMS:
await dvm.schedule(self.dvm_config) await dvm.schedule(self.dvm_config)
@ -966,3 +965,5 @@ class DVM:
except BaseException: except BaseException:
print("ende") print("ende")
print("and now my watch has ended.")

View File

@ -112,10 +112,10 @@ class DVMTaskInterface:
pass pass
def run(self): def run(self):
stop_threads = False
try: 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() self.nostr_dvm_thread.start()
except BaseException as e: except BaseException as e:
print("gone") print("gone")

View File

@ -1,6 +1,6 @@
from setuptools import setup, find_packages 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' 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') LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')

View File

@ -50,6 +50,7 @@ def build_example_gallery(name, identifier, admin_config, options, image, cost=0
dvm_config.UPDATE_DATABASE = update_db dvm_config.UPDATE_DATABASE = update_db
dvm_config.FIX_COST = cost dvm_config.FIX_COST = cost
dvm_config.CUSTOM_PROCESSING_MESSAGE = processing_msg dvm_config.CUSTOM_PROCESSING_MESSAGE = processing_msg
dvm_config.SEND_FEEDBACK_EVENTS = False
dvm_config.DELETE_ANNOUNCEMENT_ON_SHUTDOWN = delete_nip_89_on_shutdown dvm_config.DELETE_ANNOUNCEMENT_ON_SHUTDOWN = delete_nip_89_on_shutdown
admin_config.LUD16 = dvm_config.LN_ADDRESS admin_config.LUD16 = dvm_config.LN_ADDRESS