mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-09-30 21:52:29 +02:00
Update subscription.py
This commit is contained in:
@@ -45,9 +45,7 @@ class Subscription:
|
|||||||
self.job_list = []
|
self.job_list = []
|
||||||
|
|
||||||
print("Nostr Subscription Handler public key: " + str(pk.to_bech32()) + " Hex: " + str(
|
print("Nostr Subscription Handler public key: " + str(pk.to_bech32()) + " Hex: " + str(
|
||||||
pk.to_hex()) + " Name: " + self.NAME +
|
pk.to_hex()) + "\n")
|
||||||
" Supported DVM tasks: " +
|
|
||||||
', '.join(p.NAME + ":" + p.TASK for p in self.dvm_config.SUPPORTED_DVMS) + "\n")
|
|
||||||
|
|
||||||
for relay in self.dvm_config.RELAY_LIST:
|
for relay in self.dvm_config.RELAY_LIST:
|
||||||
self.client.add_relay(relay)
|
self.client.add_relay(relay)
|
||||||
@@ -304,7 +302,7 @@ class Subscription:
|
|||||||
else:
|
else:
|
||||||
delete_threshold = 60 * 60 * 24 * 365
|
delete_threshold = 60 * 60 * 24 * 365
|
||||||
if subscription.cadence == "daily":
|
if subscription.cadence == "daily":
|
||||||
delete_threshold = 60 * 60 * 24 * 7 # After 7 days, delete the subscription, user can make a new one
|
delete_threshold = 60 * 60 * 24 * 3 # After 3 days, delete the subscription, user can make a new one
|
||||||
elif subscription.cadence == "weekly":
|
elif subscription.cadence == "weekly":
|
||||||
delete_threshold = 60 * 60 * 24 * 21 # After 21 days, delete the subscription, user can make a new one
|
delete_threshold = 60 * 60 * 24 * 21 # After 21 days, delete the subscription, user can make a new one
|
||||||
elif subscription.cadence == "monthly":
|
elif subscription.cadence == "monthly":
|
||||||
|
Reference in New Issue
Block a user