Size: a a a

2020 April 08

AR

Alex RootJunior in aiogram [ru]
‌‌‎lyteloli
У вас дока как описания на моем любимом порносайте, люди туда не по делу лазят, а поугарать
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
I read ProcessPoolExecutor is better for CPU
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
But i need to do memory stuff
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
So i guess ThreadPoolExecutor is better in this case
источник

‌‌‎lyteloli in aiogram [ru]
На гите ссылка сам знаешь куда
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
Basically.
I define a dict in main.

I update it from handlers.

The thread should look for a change in the dict. If there is a change do some stuff.
источник

AR

Alex RootJunior in aiogram [ru]
sσ ᴱᴿмєנσ (ηαмσsσ)
So i guess ThreadPoolExecutor is better in this case
Yep.
источник

Forevka ÐΞV... in aiogram [ru]
sσ ᴱᴿмєנσ (ηαмσsσ)
Basically.
I define a dict in main.

I update it from handlers.

The thread should look for a change in the dict. If there is a change do some stuff.
maybe you need producer/consumer pattern?
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
How can i run that thread from bot.poolling event loop?
источник

AR

Alex RootJunior in aiogram [ru]
sσ ᴱᴿмєנσ (ηαмσsσ)
Basically.
I define a dict in main.

I update it from handlers.

The thread should look for a change in the dict. If there is a change do some stuff.
Maybe you need to use loop.create_task or ensure_future?
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
Should i change it?
источник

AR

Alex RootJunior in aiogram [ru]
Change what?
источник

AR

Alex RootJunior in aiogram [ru]
sσ ᴱᴿмєנσ (ηαмσsσ)
How can i run that thread from bot.poolling event loop?
Yep
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
Alex RootJunior
Maybe you need to use loop.create_task or ensure_future?
Mhh yes
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
Alex RootJunior
Change what?
Nothing. I was thinking of changing your pool executor to execute that thread as well
источник

s

sσ ᴱᴿмєנσ (ηαмσsσ)... in aiogram [ru]
But i can use create task
источник

.

.3gp in aiogram [ru]
кто знает как вывести message который отправил бот?
источник

S

SoHard 🎄 in aiogram [ru]
.3gp
кто знает как вывести message который отправил бот?
куда?
источник

.

.3gp in aiogram [ru]
SoHard 🎄
куда?
принт хотя бы сделать, в телеботе это делается таким образом message-1
источник

S

SoHard 🎄 in aiogram [ru]
print(message.text)
источник