From 7641bdbd580170a6fe89081ad5591f8ed8e67873 Mon Sep 17 00:00:00 2001 From: Shivam Saini <51438830+shivamsn97@users.noreply.github.com> Date: Sun, 25 Oct 2020 17:06:13 +0530 Subject: [PATCH] the transaction function should not be running async i guess. --- Performance-Optimizations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Performance-Optimizations.md b/Performance-Optimizations.md index 85ebe5e..d3795ed 100644 --- a/Performance-Optimizations.md +++ b/Performance-Optimizations.md @@ -197,7 +197,7 @@ def transaction(update, context): update=update ) -dispatcher.add_handler(CommandHandler('transaction', transaction, run_async=True)) +dispatcher.add_handler(CommandHandler('transaction', transaction, run_async=False)) ``` **Note:** You might have noticed that I moved `bank.log` before `bot.send_message`, so the log entries will be in order *most of the time*, assuming the database operations take long enough for the log to complete.