readd status prints

This commit is contained in:
Believethehype 2024-06-03 13:12:59 +02:00
parent f53a292b89
commit dd1ba27708
4 changed files with 12 additions and 1 deletions

View File

@ -150,6 +150,8 @@ class DicoverContentCurrentlyPopular(DVMTaskInterface):
result_list.append(e_tag.as_vec())
cli.disconnect()
cli.shutdown()
print("[" + self.dvm_config.IDENTIFIER + "] Filtered " + str(
len(result_list)) + " fitting events.")
return json.dumps(result_list)
def post_process(self, result, event):

View File

@ -155,6 +155,8 @@ class DicoverContentCurrentlyPopularZaps(DVMTaskInterface):
ns.finallist[event.id().to_hex()] = invoice_amount
result_list = []
print("[" + self.dvm_config.IDENTIFIER + "] Filtered " + str(
len(result_list)) + " fitting events.")
finallist_sorted = sorted(ns.finallist.items(), key=lambda x: x[1], reverse=True)[:int(options["max_results"])]
for entry in finallist_sorted:
# print(EventId.parse(entry[0]).to_bech32() + "/" + EventId.parse(entry[0]).to_hex() + ": " + str(entry[1]))

View File

@ -164,6 +164,8 @@ class DicoverContentCurrentlyPopularFollowers(DVMTaskInterface):
result_list.append(e_tag.as_vec())
cli.connect()
cli.shutdown()
print("[" + self.dvm_config.IDENTIFIER + "] Filtered " + str(
len(result_list)) + " fitting events.")
return json.dumps(result_list)

View File

@ -178,6 +178,9 @@ class DicoverContentCurrentlyPopularbyTopic(DVMTaskInterface):
result_list.append(e_tag.as_vec())
print(len(result_list))
print("[" + self.dvm_config.IDENTIFIER + "] Filtered " + str(
len(result_list)) + " fitting events.")
cli.disconnect()
cli.shutdown()
return json.dumps(result_list)
@ -192,7 +195,9 @@ class DicoverContentCurrentlyPopularbyTopic(DVMTaskInterface):
self.sync_db()
self.last_schedule = Timestamp.now().as_secs()
self.result = self.calculate_result(self.request_form)
#print(self.result)
return 1
def sync_db(self):