add tags for sentry
This commit is contained in:
parent
6e987725bc
commit
32f5c457e5
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user