diff --git a/active_bots/telegrambot.py b/active_bots/telegrambot.py index 3bd3ac2..1972664 100644 --- a/active_bots/telegrambot.py +++ b/active_bots/telegrambot.py @@ -89,7 +89,7 @@ class TelegramBot(Bot): try: for subscriber_id in user.get_telegram_subscribers(): tb.send_message(subscriber_id, text).wait() - sleep(0.5) + sleep(0.1) except Exception: logger.error('Error telegramming: ' + user.get_city() + ': ' + str(report.id), exc_info=True) diff --git a/backend.py b/backend.py index 56e39da..24e1700 100755 --- a/backend.py +++ b/backend.py @@ -31,15 +31,15 @@ if __name__ == '__main__': while True: for user in db.active_users: for bot in bots: - sleep(0.5) + sleep(0.1) reports = bot.crawl(user) for status in reports: - sleep(0.5) + sleep(0.1) if not user.is_appropriate(status): logger.info("Inaproppriate message: %d %s %s" % (user.uid, status.author, status.text)) continue for bot2 in bots: - sleep(0.5) + sleep(0.1) bot2.post(user, status) logger.info("Resent: %d %s %s" % (user.uid, status.author, status.text)) except Exception: