mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-10-10 23:22:38 +02:00
some fixes
This commit is contained in:
@@ -41,7 +41,6 @@ class AdvancedSearch(DVMTaskInterface):
|
|||||||
|
|
||||||
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
|
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
|
||||||
self.dvm_config = dvm_config
|
self.dvm_config = dvm_config
|
||||||
print(self.dvm_config.PRIVATE_KEY)
|
|
||||||
|
|
||||||
request_form = {"jobID": event.id().to_hex()}
|
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):
|
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
|
||||||
self.dvm_config = dvm_config
|
self.dvm_config = dvm_config
|
||||||
print(self.dvm_config.PRIVATE_KEY)
|
|
||||||
|
|
||||||
request_form = {"jobID": event.id().to_hex()}
|
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.
|
# Love yourself then.
|
||||||
event_id = None
|
event_id = None
|
||||||
print(e)
|
print(e)
|
||||||
|
await outboxclient.remove_all_relays()
|
||||||
await outboxclient.disconnect()
|
await outboxclient.disconnect()
|
||||||
await outboxclient.shutdown()
|
await outboxclient.shutdown()
|
||||||
return event_id
|
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://relay.f7z.io", "wss://nostr-relay.h3z.jp", "wss://nfrelay.app",
|
||||||
"wss://r.kojira.io", "wss://jp-relay-nostr.invr.chat",
|
"wss://r.kojira.io", "wss://jp-relay-nostr.invr.chat",
|
||||||
"wss://nostream-production-5895.up.railway.app",
|
"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"
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@@ -120,6 +120,12 @@ def playground(announce=False):
|
|||||||
|
|
||||||
event_struct = await cli.fetch_events([filterauth], relay_timeout)
|
event_struct = await cli.fetch_events([filterauth], relay_timeout)
|
||||||
text = ""
|
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():
|
for event in event_struct.to_vec():
|
||||||
text = text + event.content() + ";"
|
text = text + event.content() + ";"
|
||||||
|
|
||||||
@@ -153,7 +159,6 @@ def playground(announce=False):
|
|||||||
keywords = result.split(",")
|
keywords = result.split(",")
|
||||||
if len(keywords) == 0:
|
if len(keywords) == 0:
|
||||||
return json.dumps([])
|
return json.dumps([])
|
||||||
#raise Exception("No Notes were found")
|
|
||||||
|
|
||||||
filters = []
|
filters = []
|
||||||
for keyword in keywords:
|
for keyword in keywords:
|
||||||
|
Reference in New Issue
Block a user