mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 21:31:52 +01:00
minor adjustments
This commit is contained in:
parent
7b55e279ac
commit
47c842fa90
@ -20,10 +20,10 @@ from nostr_dvm.utils.dvmconfig import build_default_config
|
|||||||
from nostr_dvm.utils.nip89_utils import create_amount_tag, NIP89Config, check_and_set_d_tag, delete_nip_89
|
from nostr_dvm.utils.nip89_utils import create_amount_tag, NIP89Config, check_and_set_d_tag, delete_nip_89
|
||||||
from nostr_dvm.utils.outbox_utils import AVOID_OUTBOX_RELAY_LIST
|
from nostr_dvm.utils.outbox_utils import AVOID_OUTBOX_RELAY_LIST
|
||||||
|
|
||||||
rebroadcast_NIP89 = True # Announce NIP89 on startup Only do this if you know what you're doing.
|
rebroadcast_NIP89 = False # Announce NIP89 on startup Only do this if you know what you're doing.
|
||||||
rebroadcast_NIP65_Relay_List = True
|
rebroadcast_NIP65_Relay_List = True
|
||||||
update_profile = True
|
update_profile = True
|
||||||
delete_nip_89_on_shutdown = False
|
delete_nip_89_on_shutdown = True
|
||||||
|
|
||||||
global_update_rate = 60*60 # set this high on first sync so db can fully sync before another process trys to.
|
global_update_rate = 60*60 # set this high on first sync so db can fully sync before another process trys to.
|
||||||
use_logger = True
|
use_logger = True
|
||||||
@ -34,7 +34,8 @@ if use_logger:
|
|||||||
init_logger(log_level)
|
init_logger(log_level)
|
||||||
|
|
||||||
|
|
||||||
RELAY_LIST = ["wss://relay.nostrdvm.com"
|
RELAY_LIST = ["wss://relay.nostrdvm.com",
|
||||||
|
"wss://nostr.oxtr.dev"
|
||||||
]
|
]
|
||||||
|
|
||||||
SYNC_DB_RELAY_LIST = ["wss://relay.damus.io",
|
SYNC_DB_RELAY_LIST = ["wss://relay.damus.io",
|
||||||
|
@ -8,7 +8,7 @@ from duck_chat import ModelType
|
|||||||
from nostr_sdk import Kind, Filter, PublicKey, SecretKey, Keys, NostrSigner, RelayLimits, Options, ClientBuilder, Tag, \
|
from nostr_sdk import Kind, Filter, PublicKey, SecretKey, Keys, NostrSigner, RelayLimits, Options, ClientBuilder, Tag, \
|
||||||
LogLevel, Timestamp, NostrDatabase
|
LogLevel, Timestamp, NostrDatabase
|
||||||
|
|
||||||
|
from nostr_dvm.framework import DVMFramework
|
||||||
from nostr_dvm.tasks.generic_dvm import GenericDVM
|
from nostr_dvm.tasks.generic_dvm import GenericDVM
|
||||||
from nostr_dvm.utils import definitions
|
from nostr_dvm.utils import definitions
|
||||||
from nostr_dvm.utils.admin_utils import AdminConfig
|
from nostr_dvm.utils.admin_utils import AdminConfig
|
||||||
@ -18,8 +18,8 @@ from nostr_dvm.utils.nip89_utils import NIP89Config, check_and_set_d_tag
|
|||||||
from nostr_dvm.utils.output_utils import send_job_status_reaction
|
from nostr_dvm.utils.output_utils import send_job_status_reaction
|
||||||
from nostr_dvm.utils.outbox_utils import AVOID_OUTBOX_RELAY_LIST
|
from nostr_dvm.utils.outbox_utils import AVOID_OUTBOX_RELAY_LIST
|
||||||
|
|
||||||
RELAY_LIST = ["wss://nostr.mom",
|
RELAY_LIST = ["wss://relay.nostrdvm.com",
|
||||||
#"wss://relay.primal.net",
|
"wss://relay.primal.net",
|
||||||
"wss://nostr.oxtr.dev",
|
"wss://nostr.oxtr.dev",
|
||||||
#"wss://relay.nostr.net"
|
#"wss://relay.nostr.net"
|
||||||
]
|
]
|
||||||
@ -31,23 +31,8 @@ SYNC_DB_RELAY_LIST = ["wss://relay.damus.io",
|
|||||||
|
|
||||||
|
|
||||||
def playground(announce=False):
|
def playground(announce=False):
|
||||||
# admin_config_db_scheduler = AdminConfig()
|
|
||||||
# options = {
|
framework = DVMFramework()
|
||||||
# "db_name": "db/nostr_recent_notes.db",
|
|
||||||
# "db_since": 24 * 60 * 60, # 48h since gmt,
|
|
||||||
# "personalized": False,
|
|
||||||
# "logger": False}
|
|
||||||
# image = ""
|
|
||||||
# about = "I just update the Database based on my schedule"
|
|
||||||
# db_scheduler = build_db_scheduler("DB Scheduler",
|
|
||||||
# "db_scheduler",
|
|
||||||
# admin_config_db_scheduler, options,
|
|
||||||
# image=image,
|
|
||||||
# description=about,
|
|
||||||
# update_rate=global_update_rate,
|
|
||||||
# cost=0,
|
|
||||||
# update_db=True)
|
|
||||||
# db_scheduler.run()
|
|
||||||
|
|
||||||
kind = 5300
|
kind = 5300
|
||||||
admin_config = AdminConfig()
|
admin_config = AdminConfig()
|
||||||
@ -56,8 +41,6 @@ def playground(announce=False):
|
|||||||
admin_config.UPDATE_PROFILE = announce
|
admin_config.UPDATE_PROFILE = announce
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
name = "Your topics (beta)"
|
name = "Your topics (beta)"
|
||||||
identifier = "duckduckchat_llm" # Chose a unique identifier in order to get a lnaddress
|
identifier = "duckduckchat_llm" # Chose a unique identifier in order to get a lnaddress
|
||||||
dvm_config = build_default_config(identifier)
|
dvm_config = build_default_config(identifier)
|
||||||
@ -70,12 +53,6 @@ def playground(announce=False):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#admin_config.DELETE_NIP89 = True
|
|
||||||
#admin_config.POW = True
|
|
||||||
#admin_config.EVENTID = "5322b731230cf8961f8403d025722a381af9b012b5d5f6dcc09f88e160f4e4ff"
|
|
||||||
#admin_config.PRIVKEY = dvm_config.PRIVATE_KEY
|
|
||||||
|
|
||||||
|
|
||||||
# Add NIP89
|
# Add NIP89
|
||||||
nip89info = {
|
nip89info = {
|
||||||
"name": name,
|
"name": name,
|
||||||
@ -216,7 +193,8 @@ def playground(announce=False):
|
|||||||
|
|
||||||
|
|
||||||
dvm.process = process # overwrite the process function with the above one
|
dvm.process = process # overwrite the process function with the above one
|
||||||
dvm.run(True)
|
framework.add(dvm)
|
||||||
|
framework.run()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@ -231,4 +209,4 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
raise FileNotFoundError(f'.env file not found at {env_path} ')
|
raise FileNotFoundError(f'.env file not found at {env_path} ')
|
||||||
|
|
||||||
playground(announce=False)
|
playground(announce=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user