And even more async

This commit is contained in:
2023-07-19 14:33:16 +02:00
committed by migatu
parent 5d5c136b41
commit 35a65e48e9
+2 -2
View File
@@ -853,7 +853,7 @@ async def wyszukaj(ctx, how_many=0, slowa_kluczowe=None):
"mp3",
]
all_words = []
for f_iter in file:
async for f_iter in async_iterator_generator(file):
for char in char_remove:
f_iter = f_iter.replace(char, "")
tmp = f_iter.split()
@@ -865,7 +865,7 @@ async def wyszukaj(ctx, how_many=0, slowa_kluczowe=None):
else:
skip = 4
matched_times = 1
for itm in all_words[skip:]:
async for itm in async_iterator_generator(all_words[skip:]):
pingu += 1
pattern = ".*" + word + ".*"
if re.match(pattern, itm, re.IGNORECASE):