more adaptation to new sdk (async functions)

This commit is contained in:
Believethehype
2024-06-09 12:59:41 +02:00
parent 96e0be239f
commit 823671cc9b
10 changed files with 67 additions and 57 deletions

View File

@@ -140,11 +140,11 @@ class DiscoverInactiveFollows(DVMTaskInterface):
for i in range(i, i + st):
filter1 = Filter().author(PublicKey.from_hex(users[i])).since(notactivesince).limit(1)
filters.append(filter1)
event_from_authors = cli.get_events_of(filters, timedelta(seconds=10))
event_from_authors = await cli.get_events_of(filters, timedelta(seconds=10))
for author in event_from_authors:
instance.dic[author.author().to_hex()] = "True"
print(str(i) + "/" + str(len(users)))
cli.disconnect()
await cli.shutdown()
threads = []
begin = 0