Update content_discovery_currently_popular.py

This commit is contained in:
Believethehype 2024-05-13 08:51:47 +02:00
parent 7cd683df4c
commit c1bfcc762b

View File

@ -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
# 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)
cli.reconcile(filter1, dbopts)
database.delete(Filter().until(Timestamp.from_secs(
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,