Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#603 Create timeouts for cache warmup #616

Merged
merged 1 commit into from
Oct 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/docker-compose-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
networks:
- se-backend
- se-frontend
command: ./docker/wait-for.sh postgres:5432 -- gunicorn shopelectro.wsgi:application -c /etc/gunicorn.py -b 0.0.0.0:$VIRTUAL_HOST_PORT
command: gunicorn shopelectro.wsgi:application -c /etc/gunicorn.py -b 0.0.0.0:$VIRTUAL_HOST_PORT

celery-beat:
image: fidals/se:prod
Expand Down
6 changes: 5 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ services:
- $VIRTUAL_HOST_LIVESERVER_PORT
networks:
- se-backend
command: ./docker/wait-for.sh postgres:5432 -- python manage.py runserver 0.0.0.0:$VIRTUAL_HOST_PORT
# @todo #603:60m Resurrect postgres waiting
# This prefix for app docker service's command does not work:
# `./docker/wait-for.sh postgres:5432 -- `
# Prefix was used in docker-compose-production too.
command: python manage.py runserver 0.0.0.0:$VIRTUAL_HOST_PORT

app-drone:
extends: app-base
Expand Down
1 change: 1 addition & 0 deletions etc/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
worker_class = 'sync'
max_requests = 300
max_requests_jitter = 300
timeout = 120
errorlog = '-'
2 changes: 2 additions & 0 deletions etc/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# for cache warmup
proxy_read_timeout 120s;
proxy_pass http://app:8000;
}

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ ua-parser==0.8.0
user-agents==1.1.0
sorl-thumbnail==12.4a1
https://github.com/selwin/django-user_agents/archive/master.zip
https://github.com/fidals/refarm-site/archive/0.4.8.zip
https://github.com/fidals/refarm-site/archive/0.4.9.zip
1 change: 1 addition & 0 deletions shopelectro/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class ExcludedModelTPageQuerySet(pages_models.PageQuerySet):
def exclude_type(self):
return self.exclude(type=pages_models.Page.MODEL_TYPE)


# @todo #rf169:30m Fix model.Manager bad inheritance
# Now we have this problem:
# ```
Expand Down