mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 13:21:48 +01:00
Update dvmtaskinterface.py
This commit is contained in:
parent
47c842fa90
commit
9626c08201
@ -38,7 +38,7 @@ class DVMTaskInterface:
|
||||
def __init__(self, name, dvm_config: DVMConfig, nip89config: NIP89Config, nip88config: NIP88Config = None,
|
||||
admin_config: AdminConfig = None,
|
||||
options=None, task=None):
|
||||
self.stop_threads = False
|
||||
self.stop_thread = False
|
||||
self.nostr_dvm_thread = None
|
||||
if options is None:
|
||||
self.options = {}
|
||||
@ -112,17 +112,17 @@ class DVMTaskInterface:
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
stop_threads = False
|
||||
self.stop_thread = False
|
||||
|
||||
try:
|
||||
self.nostr_dvm_thread = Thread(target=self.DVM, args=[self.dvm_config, self.admin_config, lambda: stop_threads], daemon=False)
|
||||
self.nostr_dvm_thread = Thread(target=self.DVM, args=[self.dvm_config, self.admin_config, lambda: self.stop_thread], daemon=False)
|
||||
self.nostr_dvm_thread.start()
|
||||
except BaseException as e:
|
||||
print("gone")
|
||||
|
||||
|
||||
def join(self):
|
||||
self.stop_threads = True
|
||||
self.stop_thread = True
|
||||
self.nostr_dvm_thread.join(1)
|
||||
dvm_shutdown(self.dvm_config)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user