From 814af8417186c43ec1cc98d45e9f87d7c921b070 Mon Sep 17 00:00:00 2001 From: Believethehype Date: Mon, 22 Jan 2024 19:01:39 +0100 Subject: [PATCH] add option to deactivate "processing" feedback (on by default) --- nostr_dvm/dvm.py | 5 +++-- nostr_dvm/utils/dvmconfig.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nostr_dvm/dvm.py b/nostr_dvm/dvm.py index 4378850..dcd2a05 100644 --- a/nostr_dvm/dvm.py +++ b/nostr_dvm/dvm.py @@ -135,8 +135,9 @@ class DVM: "[" + self.dvm_config.NIP89.NAME + "] Free task or Whitelisted for task " + task + ". Starting processing..") - send_job_status_reaction(nip90_event, "processing", True, 0, - client=self.client, dvm_config=self.dvm_config) + if dvm_config.SEND_FEEDBACK_EVENTS: + send_job_status_reaction(nip90_event, "processing", True, 0, + client=self.client, dvm_config=self.dvm_config) # when we reimburse users on error make sure to not send anything if it was free if user.iswhitelisted or task_is_free: diff --git a/nostr_dvm/utils/dvmconfig.py b/nostr_dvm/utils/dvmconfig.py index 99b4371..46a2d29 100644 --- a/nostr_dvm/utils/dvmconfig.py +++ b/nostr_dvm/utils/dvmconfig.py @@ -32,6 +32,7 @@ class DVMConfig: DB: str NEW_USER_BALANCE: int = 0 # Free credits for new users NIP89: NIP89Config + SEND_FEEDBACK_EVENTS = True SHOW_RESULT_BEFORE_PAYMENT: bool = False # if this is true show results even when not paid right after autoprocess