mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-04-15 20:43:13 +00:00
Added timeout to GET request
This commit is contained in:
parent
e1e6e12980
commit
82a92239e7
@ -9,9 +9,11 @@ services:
|
||||
context: ../../
|
||||
dockerfile: Docker/Dev/Dockerfile
|
||||
command: >
|
||||
bash -c "python3 src/manage.py makemigrations
|
||||
&& python3 src/manage.py migrate
|
||||
&& python src/manage.py runserver 0.0.0.0:8000"
|
||||
bash -c "cd src
|
||||
&& python3 manage.py makemigrations account
|
||||
&& python3 manage.py makemigrations series
|
||||
&& python3 manage.py migrate
|
||||
&& python manage.py runserver 0.0.0.0:8000"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
|
@ -5,7 +5,7 @@ from .exceptions import *
|
||||
|
||||
|
||||
def get_request(url: str) -> Union[StatusCodeError, APIError, MaximumUsageError, Dict]:
|
||||
raw_data = get(url)
|
||||
raw_data = get(url, timeout=7)
|
||||
|
||||
if raw_data.status_code != 200:
|
||||
raise StatusCodeError(raw_data.status_code)
|
||||
|
Loading…
x
Reference in New Issue
Block a user