move feeds to ptb
This commit is contained in:
@@ -4,8 +4,8 @@ import sentry_sdk
|
||||
from celery_once import QueueOnce
|
||||
from django.utils import timezone
|
||||
from django.core.cache import cache
|
||||
from telebot import TeleBot
|
||||
from djconfig import config
|
||||
from telegram import Bot
|
||||
|
||||
from config.celery import app
|
||||
|
||||
@@ -33,7 +33,7 @@ def execute_feed(feed_pk):
|
||||
with sentry_sdk.configure_scope() as scope:
|
||||
scope.set_tag('feed', str(feed))
|
||||
try:
|
||||
bot = TeleBot(config.feed_bot_token, threaded=False)
|
||||
bot = Bot(config.feed_bot_token)
|
||||
print(f'Last ID for "{feed}" = "{feed.last_id}"')
|
||||
for last_id in feed.config.execute(bot, feed.chat_id, feed.last_id):
|
||||
if last_id:
|
||||
|
Reference in New Issue
Block a user