Skip to content

Commit

Permalink
flake error
Browse files Browse the repository at this point in the history
  • Loading branch information
barrycarey committed May 27, 2024
1 parent b867d8d commit 8c064b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion redditrepostsleuth/core/celery/tasks/adult_promoter_tasks.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import logging

from celery import Task
from prawcore import TooManyRequests
from redis import Redis
from sqlalchemy.exc import IntegrityError

from redditrepostsleuth.core.celery import celery
from redditrepostsleuth.core.config import Config
from redditrepostsleuth.core.db.db_utils import get_db_engine
from redditrepostsleuth.core.db.uow.unitofworkmanager import UnitOfWorkManager
from redditrepostsleuth.core.exception import UtilApiException
from redditrepostsleuth.core.exception import UtilApiException, UserNotFound
from redditrepostsleuth.core.notification.notification_service import NotificationService
from redditrepostsleuth.core.services.eventlogging import EventLogging
from redditrepostsleuth.core.services.response_handler import ResponseHandler
from redditrepostsleuth.core.util.onlyfans_handling import check_user_comments_for_promoter_links
from redditrepostsleuth.core.util.reddithelpers import get_reddit_instance

# TODO - THis should be safe to remove

class AdultPromoterTask(Task):
def __init__(self):
Expand All @@ -30,6 +35,8 @@ def __init__(self):
)


log = logging.getLogger(__name__)

@celery.task(bind=True, base=AdultPromoterTask, autoretry_for=(UtilApiException,ConnectionError,TooManyRequests), retry_kwards={'max_retries': 3})
def check_user_comments_for_only_fans(self, username: str) -> None:
"""
Expand Down

0 comments on commit 8c064b2

Please sign in to comment.