Skip to content

Commit

Permalink
fix leaky bucket use
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Aug 20, 2024
1 parent e012f34 commit c9f1164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ofscraper/classes/sessionmanager/download.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import contextlib
import time
from aiolimiter import AsyncLimiter
import asyncio
import ofscraper.classes.sessionmanager.ofsession as ofsessionmanager
import ofscraper.classes.sessionmanager.sessionmanager as sessionManager
Expand All @@ -15,6 +14,7 @@
SIGN,
TOO_MANY,
)
from ofscraper.classes.sessionmanager.leaky import LeakyBucket
import ofscraper.utils.settings as settings


Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(
wait_min = wait_min or constants.getattr("OF_MIN_WAIT_API")
wait_max = wait_max or constants.getattr("OF_MAX_WAIT_API")
log = log or common_globals.log
self.leaky_bucket = AsyncLimiter(settings.get_download_limit(), 1)
self.leaky_bucket = LeakyBucket(settings.get_download_limit(), 1)
super().__init__(
sem_count=sem_count,
retries=retries,
Expand Down

0 comments on commit c9f1164

Please sign in to comment.