-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added throttle for requests (#9)
- Loading branch information
1 parent
2ce49ce
commit 98f2cfa
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
from .prettifier import print_output | ||
from .prettifier import print_output | ||
|
||
from .throttle import perform_request_await |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import time | ||
|
||
# Represents throttle request duration time. | ||
THROTTLE_REQUEST_DURATION: float = 0.3 | ||
|
||
|
||
def perform_request_await() -> None: | ||
"""Performs throttle request operation.""" | ||
|
||
time.sleep(THROTTLE_REQUEST_DURATION) |