Skip to content

Commit

Permalink
we need to log current timestamp, not message, because the message ma…
Browse files Browse the repository at this point in the history
…y be old
  • Loading branch information
graynk committed Feb 20, 2022
1 parent 8710286 commit 4e12f2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def transcribe(file_name: str, message: Message, lang_code: str = 'ru-RU', alter
(message.chat_id,))
cur.execute("update customer set balance = balance - (%s);",
(actual_duration,))
cur.execute("insert into stat(user_id, message_timestamp, duration) values (%s, %s, %s);",
(message.chat_id, message.date, actual_duration))
cur.execute("insert into stat(user_id, message_timestamp, duration) values (%s, current_timestamp, %s);",
(message.chat_id, actual_duration))
conn.commit()

os.remove(file_name)
Expand Down

0 comments on commit 4e12f2e

Please sign in to comment.