mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-06-29 05:28:54 +02:00
fix nostrband search by deactivating ping
This commit is contained in:
@ -401,6 +401,7 @@ class DVM:
|
|||||||
post_processed = dvm.post_process(data, original_event)
|
post_processed = dvm.post_process(data, original_event)
|
||||||
send_nostr_reply_event(post_processed, original_event.as_json())
|
send_nostr_reply_event(post_processed, original_event.as_json())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
# Zapping back by error in post-processing is a risk for the DVM because work has been done,
|
# Zapping back by error in post-processing is a risk for the DVM because work has been done,
|
||||||
# but maybe something with parsing/uploading failed. Try to avoid errors here as good as possible
|
# but maybe something with parsing/uploading failed. Try to avoid errors here as good as possible
|
||||||
send_job_status_reaction(original_event, "error",
|
send_job_status_reaction(original_event, "error",
|
||||||
@ -596,9 +597,11 @@ class DVM:
|
|||||||
post_processed = dvm.post_process(result, job_event)
|
post_processed = dvm.post_process(result, job_event)
|
||||||
send_nostr_reply_event(post_processed, job_event.as_json())
|
send_nostr_reply_event(post_processed, job_event.as_json())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
send_job_status_reaction(job_event, "error", content=str(e),
|
send_job_status_reaction(job_event, "error", content=str(e),
|
||||||
dvm_config=self.dvm_config)
|
dvm_config=self.dvm_config)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
# we could send the exception here to the user, but maybe that's not a good idea after all.
|
# we could send the exception here to the user, but maybe that's not a good idea after all.
|
||||||
send_job_status_reaction(job_event, "error", content=result,
|
send_job_status_reaction(job_event, "error", content=result,
|
||||||
dvm_config=self.dvm_config)
|
dvm_config=self.dvm_config)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from nostr_sdk import Client, Timestamp, PublicKey, Tag, Keys, Options, SecretKey, NostrSigner, Kind
|
from nostr_sdk import Client, Timestamp, PublicKey, Tag, Keys, Options, SecretKey, NostrSigner, Kind, RelayOptions
|
||||||
|
|
||||||
from nostr_dvm.interfaces.dvmtaskinterface import DVMTaskInterface, process_venv
|
from nostr_dvm.interfaces.dvmtaskinterface import DVMTaskInterface, process_venv
|
||||||
from nostr_dvm.utils.admin_utils import AdminConfig
|
from nostr_dvm.utils.admin_utils import AdminConfig
|
||||||
@ -95,7 +95,9 @@ class AdvancedSearch(DVMTaskInterface):
|
|||||||
signer = NostrSigner.keys(keys)
|
signer = NostrSigner.keys(keys)
|
||||||
cli = Client.with_opts(signer, opts)
|
cli = Client.with_opts(signer, opts)
|
||||||
|
|
||||||
cli.add_relay(options["relay"])
|
ropts = RelayOptions().ping(False)
|
||||||
|
cli.add_relay_with_opts(options["relay"], ropts)
|
||||||
|
|
||||||
cli.connect()
|
cli.connect()
|
||||||
|
|
||||||
#earch_since_seconds = int(options["since"]) * 24 * 60 * 60
|
#earch_since_seconds = int(options["since"]) * 24 * 60 * 60
|
||||||
|
Reference in New Issue
Block a user