-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements in async executor, now it can run async and blocking mod…
…ules differently, so we never block executor's event loop. Introduce `async def` syntax in non-blocking modules
- Loading branch information
1 parent
7a1055f
commit 89d8255
Showing
5 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
|
||
def main(bot, *args, **kwargs): | ||
async def main(bot, *args, **kwargs): | ||
""" | ||
echo <text> | ||
Echoes input text | ||
""" | ||
bot.send(chat_id=kwargs.get('chat_id'), text=' '.join(args)) | ||
return ' '.join(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
def main(bot, *args, **kwargs): | ||
async def main(bot, *args, **kwargs): | ||
""" | ||
lsmod | ||
Show loaded modules. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters