This commit is contained in:
bakatrouble 2019-03-14 09:58:33 +03:00
parent d5ed758605
commit 06534555d5

View File

@ -30,11 +30,11 @@ def execute_feed(feed_pk):
try: try:
feed = Feed.objects.get(pk=feed_pk) feed = Feed.objects.get(pk=feed_pk)
if not feed.lock: # if not feed.lock:
feed.lock = True # feed.lock = True
feed.save() # feed.save()
else: # else:
raise Reject('Lock', requeue=False) # 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}"')