mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-19 20:26:28 +01:00
add adminconfig per dvm
This commit is contained in:
@@ -2,7 +2,9 @@ from threading import Thread
|
||||
|
||||
from dvm import DVM
|
||||
from interfaces.dvmtaskinterface import DVMTaskInterface
|
||||
from utils.admin_utils import AdminConfig
|
||||
from utils.definitions import EventDefinitions
|
||||
from utils.dvmconfig import DVMConfig
|
||||
from utils.nostr_utils import get_referenced_event_by_id, get_event_by_id
|
||||
|
||||
"""
|
||||
@@ -20,14 +22,14 @@ class Translation(DVMTaskInterface):
|
||||
COST: int = 0
|
||||
PK: str
|
||||
|
||||
def __init__(self, name, dvm_config):
|
||||
def __init__(self, name, dvm_config: DVMConfig, admin_config: AdminConfig = None):
|
||||
self.NAME = name
|
||||
dvm_config.SUPPORTED_TASKS = [self]
|
||||
dvm_config.DB = "db/" + self.NAME + ".db"
|
||||
self.PK = dvm_config.PRIVATE_KEY
|
||||
|
||||
dvm = DVM
|
||||
nostr_dvm_thread = Thread(target=dvm, args=[dvm_config])
|
||||
nostr_dvm_thread = Thread(target=dvm, args=[dvm_config, admin_config])
|
||||
nostr_dvm_thread.start()
|
||||
|
||||
def is_input_supported(self, input_type, input_content):
|
||||
|
||||
Reference in New Issue
Block a user