Skip to content

Commit f69570a

Browse files
authored
Update DRF-gis to 1.0 (#705)
* Update DRF-gis to 1.0 * Remove celery * Remove BROKER_URL from config
1 parent 55db5b1 commit f69570a

File tree

7 files changed

+1
-65
lines changed

7 files changed

+1
-65
lines changed

DEPLOY.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ You can access your ``osmcha-django`` instance in http://localhost/ at your brow
1414
It is also possible to deploy to Heroku or to your own server by using Dokku, an open
1515
source Heroku clone.
1616

17-
To put celery in production we need a celeryd and a celery beat services running on
18-
the machine. More information: https://celery.readthedocs.org/en/latest/tutorials/daemonizing.html#daemonizing
19-
20-
And we also need to set periodic tasks to import the changesets daily or hourly: https://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html
21-
2217
If you find any issue, please report. We didn't test it in Heroku and Dokku
2318

2419
Heroku

compose/django/entrypoint.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ export POSTGRES_USER=$POSTGRES_USER
2121
export POSTGRES_PASSWORD=$POSTGRES_PASSWORD
2222
# export DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_USER
2323

24-
export CELERY_BROKER_URL=$REDIS_URL/0
25-
26-
2724
function postgres_ready(){
2825
python << END
2926
import sys

config/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
from __future__ import absolute_import
2-
3-
# This will make sure the app is always imported when
4-
# Django starts so that shared_task will use this app.
5-
from .celery import app as celery_app # noqa
6-
7-
__all__ = ['celery_app']

config/celery.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

config/settings/common.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@
235235
# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application
236236
WSGI_APPLICATION = 'config.wsgi.application'
237237

238-
# CELERY CONFIGURATION
239-
BROKER_URL = env('CELERY_BROKER_URL', default='redis://localhost:6379/0')
240-
241238
# Some really nice defaults
242239
# ACCOUNT_AUTHENTICATION_METHOD = 'username'
243240
# ACCOUNT_EMAIL_REQUIRED = True

docker-compose.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,3 @@ services:
3232

3333
redis:
3434
image: redis:latest
35-
36-
celeryworker:
37-
build:
38-
context: .
39-
env_file: .env
40-
depends_on:
41-
- postgres
42-
- redis
43-
command: celery -A config worker -l INFO
44-
45-
celerybeat:
46-
build:
47-
context: .
48-
env_file: .env
49-
depends_on:
50-
- postgres
51-
- redis
52-
command: celery -A config beat -l INFO

requirements/base.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ social-auth-core==4.5.3
1717

1818
# DRF and DRF-gis
1919
djangorestframework==3.11.2
20-
djangorestframework-gis==0.17
20+
djangorestframework-gis==1.0.0
2121
djangorestframework-csv==2.1.1
2222
django-filter==2.4.0
2323
django-cors-headers==3.7.0
@@ -33,9 +33,6 @@ django-autoslug==1.9.8
3333
# Time zones support
3434
pytz==2021.1
3535

36-
# Celery support
37-
celery==4.4.7
38-
3936
# Redis support
4037
django-redis==4.11.0
4138
redis>=2.10.5

0 commit comments

Comments
 (0)