Answer the question
In order to leave comments, you need to log in
Why is the telegram bot process constantly shutting down on heroku?
I uploaded the bot to Heroku, everything works, the main task is to send reminders, but it only partially copes with it.
Reminders work like this:
def back_func(message):
main_keyboard = telebot.types.ReplyKeyboardMarkup(True, False)
main_keyboard.row('/1. Команда 1')
main_keyboard.row('/2. Команда 2')
bot.send_message(message.from_user.id, 'Ответ', reply_markup=main_keyboard)
k = 1
while k < 2:
sleep(60)
handler_remind(message)
k += 1
if k == 2:
break
2016-07-02T04:27:24.307059+00:00 heroku[web.1]: Idling
2016-07-02T04:27:27.008404+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-07-02T04:27:28.452832+00:00 heroku[web.1]: Process exited with status 143
web: (python -m http.server $PORT &) && (python bot.py)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question