mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-09-29 09:03:13 +02:00
Update content_discovery_currently_popular.py
This commit is contained in:
@@ -176,13 +176,13 @@ class DicoverContentCurrentlyPopular(DVMTaskInterface):
|
|||||||
filter1 = Filter().kinds([definitions.EventDefinitions.KIND_NOTE, definitions.EventDefinitions.KIND_REACTION, definitions.EventDefinitions.KIND_ZAP]).since(lasthour) # Notes, reactions, zaps
|
filter1 = Filter().kinds([definitions.EventDefinitions.KIND_NOTE, definitions.EventDefinitions.KIND_REACTION, definitions.EventDefinitions.KIND_ZAP]).since(lasthour) # Notes, reactions, zaps
|
||||||
|
|
||||||
# filter = Filter().author(keys.public_key())
|
# filter = Filter().author(keys.public_key())
|
||||||
print("Syncing Notes of last hour.. this might take a while..")
|
print("[" + self.dvm_config.IDENTIFIER + "] Syncing notes of the last " + str(self.db_since) + " seconds.. this might take a while..")
|
||||||
dbopts = NegentropyOptions().direction(NegentropyDirection.DOWN)
|
dbopts = NegentropyOptions().direction(NegentropyDirection.DOWN)
|
||||||
cli.reconcile(filter1, dbopts)
|
cli.reconcile(filter1, dbopts)
|
||||||
database.delete(Filter().until(Timestamp.from_secs(
|
database.delete(Filter().until(Timestamp.from_secs(
|
||||||
Timestamp.now().as_secs() - self.db_since))) # Clear old events so db doesnt get too full.
|
Timestamp.now().as_secs() - self.db_since))) # Clear old events so db doesnt get too full.
|
||||||
|
|
||||||
print("Done Syncing Notes of Last hour.")
|
print("[" + self.dvm_config.IDENTIFIER + "] Done Syncing Notes of the last " + str(self.db_since) + " seconds..")
|
||||||
|
|
||||||
|
|
||||||
# We build an example here that we can call by either calling this file directly from the main directory,
|
# We build an example here that we can call by either calling this file directly from the main directory,
|
||||||
|
Reference in New Issue
Block a user