add tags for sentry

This commit is contained in:
bakatrouble 2019-04-11 02:07:37 +03:00
parent 6e987725bc
commit 32f5c457e5

View File

@ -28,16 +28,11 @@ def execute_feed(feed_pk):
config._reload_maybe() config._reload_maybe()
feed = None
try:
feed = Feed.objects.get(pk=feed_pk) feed = Feed.objects.get(pk=feed_pk)
# if not feed.lock: with sentry_sdk.configure_scope() as scope:
# feed.lock = True scope.set_extra('feed', str(feed))
# feed.save() try:
# else:
# raise Reject('Lock', requeue=False)
bot = TeleBot(config.feed_bot_token, threaded=False) bot = TeleBot(config.feed_bot_token, threaded=False)
print(f'Last ID for "{feed}" = "{feed.last_id}"') print(f'Last ID for "{feed}" = "{feed.last_id}"')
for last_id in feed.config.execute(bot, feed.chat_id, feed.last_id): for last_id in feed.config.execute(bot, feed.chat_id, feed.last_id):