mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 13:21:48 +01:00
fixes wot option
This commit is contained in:
parent
00f24f756f
commit
03a2fa1d77
2
.idea/dvm.iml
generated
2
.idea/dvm.iml
generated
@ -14,7 +14,7 @@
|
||||
<excludeFolder url="file://$MODULE_DIR$/p1234" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/p23" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.11 (dvm)" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.12 (dvm)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -3,5 +3,5 @@
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.10 (dvm)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (dvm)" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (dvm)" project-jdk-type="Python SDK" />
|
||||
</project>
|
@ -8,7 +8,7 @@ from itertools import islice
|
||||
import networkx as nx
|
||||
from nostr_sdk import Client, Timestamp, PublicKey, Tag, Keys, Options, SecretKey, NostrSigner, NostrDatabase, \
|
||||
ClientBuilder, Filter, NegentropyOptions, NegentropyDirection, init_logger, LogLevel, Event, EventId, Kind, \
|
||||
RelayLimits
|
||||
RelayLimits, RelayFilteringMode
|
||||
|
||||
from nostr_dvm.interfaces.dvmtaskinterface import DVMTaskInterface, process_venv
|
||||
from nostr_dvm.utils import definitions
|
||||
@ -132,11 +132,14 @@ class DicoverContentDBUpdateScheduler(DVMTaskInterface):
|
||||
try:
|
||||
relaylimits = RelayLimits.disable()
|
||||
opts = (Options().wait_for_send(False).send_timeout(timedelta(seconds=self.dvm_config.RELAY_LONG_TIMEOUT))).relay_limits(relaylimits)
|
||||
if self.dvm_config.WOT_FILTERING:
|
||||
opts = opts.filtering_mode(RelayFilteringMode.WHITELIST)
|
||||
sk = SecretKey.from_hex(self.dvm_config.PRIVATE_KEY)
|
||||
keys = Keys.parse(sk.to_hex())
|
||||
signer = NostrSigner.keys(keys)
|
||||
if self.database is None:
|
||||
self.database = NostrDatabase.lmdb(self.db_name)
|
||||
|
||||
cli = ClientBuilder().signer(signer).database(self.database).opts(opts).build()
|
||||
|
||||
for relay in self.dvm_config.RECONCILE_DB_RELAY_LIST:
|
||||
|
2
setup.py
2
setup.py
@ -1,6 +1,6 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
VERSION = '0.8.20'
|
||||
VERSION = '0.8.21'
|
||||
DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines'
|
||||
LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')
|
||||
|
||||
|
@ -621,7 +621,7 @@ def playground():
|
||||
admin_config_db_scheduler= AdminConfig()
|
||||
options_animal = {
|
||||
"db_name": main_db,
|
||||
"db_since": 48 * 60 * 60, # 48h since gmt,
|
||||
"db_since": 6 * 60 * 60, # 48h since gmt,
|
||||
"personalized": False,
|
||||
"logger": False}
|
||||
image = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user