L
L
Laziz Ortikov2022-02-01 13:35:16
css
Laziz Ortikov, 2022-02-01 13:35:16

What is executor in aiogram?

Hello everyone, why is there no explanation in the dock. What is executor in aiogram ? How am I supposed to understand what it is. So help me figure out what it is or discard the article

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
display: block, 2015-01-03
@XenTerSeO

<div class="parent">
    <div class="child"></div>
    <div class="child"></div>
    <div class="child"></div>
</div>

.parent{
  width: 50%;
  margin: 0 auto;
  height: 500px;
  border: 1px solid;
  text-align: center;
}
.child{
  border: 1px inset tomato;
  height: 150px;
  width: 33.333%;
  display:inline-block;
  box-sizing: border-box;
}
.child:last-child{
  float:right;
}
.child:first-child{
  float:left;
}

codepen.io/anon/pen/MKJrOr

D
del993788, 2016-01-05
@del993788

Flex

D
Dr. Bacon, 2022-02-01
@bacon

Since aiogram has almost no documentation, you should have a good knowledge of python and async in order to understand the source code and examples.

V
Vindicar, 2022-02-01
@Vindicar

AIogram can work in two modes - polling and webhooks. As I understand it, the executor allows the rest of the bot mechanisms to abstract from the mode used.
For example, start_polling() simply creates an asyncio reactor (loop) and starts the self.dispatcher.start_polling() task in it, and then waits for the completion signal. Well, it also pulls the on_startup and on_shutdown handlers. This can also be done manually if necessary.
webhooks uses aiohttp to implement a web server that will receive requests from telegram.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question