mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 21:31:52 +01:00
some fixes
This commit is contained in:
parent
a39a9a291c
commit
57e1df0c12
@ -41,7 +41,6 @@ class AdvancedSearch(DVMTaskInterface):
|
||||
|
||||
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
|
||||
self.dvm_config = dvm_config
|
||||
print(self.dvm_config.PRIVATE_KEY)
|
||||
|
||||
request_form = {"jobID": event.id().to_hex()}
|
||||
|
||||
|
@ -41,7 +41,6 @@ class AdvancedSearchWine(DVMTaskInterface):
|
||||
|
||||
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
|
||||
self.dvm_config = dvm_config
|
||||
print(self.dvm_config.PRIVATE_KEY)
|
||||
|
||||
request_form = {"jobID": event.id().to_hex()}
|
||||
|
||||
|
@ -259,7 +259,7 @@ async def send_event_outbox(event: Event, client, dvm_config) -> EventId:
|
||||
# Love yourself then.
|
||||
event_id = None
|
||||
print(e)
|
||||
|
||||
await outboxclient.remove_all_relays()
|
||||
await outboxclient.disconnect()
|
||||
await outboxclient.shutdown()
|
||||
return event_id
|
||||
|
@ -69,6 +69,9 @@ AVOID_OUTBOX_RELAY_LIST = ["wss://nos.lol",
|
||||
"wss://relay.f7z.io", "wss://nostr-relay.h3z.jp", "wss://nfrelay.app",
|
||||
"wss://r.kojira.io", "wss://jp-relay-nostr.invr.chat",
|
||||
"wss://nostream-production-5895.up.railway.app",
|
||||
"ws://127.0.0.1:4869", "wss://sign.siamstr.com", "wss://relay.hash.stream"
|
||||
"ws://127.0.0.1:4869", "wss://sign.siamstr.com", "wss://relay.hash.stream",
|
||||
"wss://pablof7z.nostr1.com", "wss://nostr.beckmeyer.us", "wss://pow.hzrd149.com",
|
||||
"wss://relay.nostrss.re", "wss://relay.nostr.bg"
|
||||
|
||||
|
||||
]
|
||||
|
@ -841,7 +841,7 @@ def playground():
|
||||
# admin_config_plants.EVENTID = "ff28be59708ee597c7010fd43a7e649e1ab51da491266ca82a84177e0007e4d6"
|
||||
# admin_config_plants.POW = True
|
||||
options_mining = {
|
||||
"search_list": ["bitaxe", "homeminer", "S9", "homemining"],
|
||||
"search_list": ["bitaxe", "homeminer", " S9 ", "homemining"],
|
||||
"avoid_list": ["nsfw"],
|
||||
"db_name": "db/nostr_recent_notes.db",
|
||||
"db_since": 12 * 60 * 60, # 12h since gmt
|
||||
|
@ -120,6 +120,12 @@ def playground(announce=False):
|
||||
|
||||
event_struct = await cli.fetch_events([filterauth], relay_timeout)
|
||||
text = ""
|
||||
|
||||
if len(event_struct.to_vec()) == 0:
|
||||
#raise Exception("No Notes found")
|
||||
print("No Notes found")
|
||||
return json.dumps([])
|
||||
|
||||
for event in event_struct.to_vec():
|
||||
text = text + event.content() + ";"
|
||||
|
||||
@ -153,7 +159,6 @@ def playground(announce=False):
|
||||
keywords = result.split(",")
|
||||
if len(keywords) == 0:
|
||||
return json.dumps([])
|
||||
#raise Exception("No Notes were found")
|
||||
|
||||
filters = []
|
||||
for keyword in keywords:
|
||||
|
Loading…
x
Reference in New Issue
Block a user