Skip to content

Commit 350fa96

Browse files
authored
Merge pull request #182 from cmu-delphi/development
Removed Celery
2 parents 62f738c + 400b6e7 commit 350fa96

File tree

7 files changed

+620
-675
lines changed

7 files changed

+620
-675
lines changed

Pipfile

-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ name = "pypi"
55

66
[packages]
77
'sentry-sdk[django]' = "*"
8-
celery = {version = "*", extras = ["redis"]}
98
coverage = "*"
109
crispy-bootstrap5 = "*"
1110
django = "*"
12-
django-celery-beat = "*"
1311
django-cors-headers = "*"
1412
django-coverage-plugin = "*"
1513
django-crispy-forms = "*"

Pipfile.lock

+613-526
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yaml

-45
Original file line numberDiff line numberDiff line change
@@ -63,52 +63,7 @@ services:
6363
depends_on:
6464
- sdwebapp
6565

66-
celery:
67-
build: .
68-
env_file:
69-
- ./.env
70-
container_name: signal_documentation-celery
71-
working_dir: /usr/src/signal_documentation/src
72-
command: celery -A signal_documentation worker -l info
73-
volumes:
74-
- .:/usr/src/signal_documentation
75-
depends_on:
76-
- db
77-
- redis
78-
79-
celery-beat:
80-
build: .
81-
env_file:
82-
- ./.env
83-
container_name: signal_documentation-celery-beat
84-
working_dir: /usr/src/signal_documentation/src
85-
command: celery -A signal_documentation beat -l info
86-
volumes:
87-
- .:/usr/src/signal_documentation
88-
depends_on:
89-
- db
90-
- redis
91-
92-
flower:
93-
build: .
94-
env_file:
95-
- ./.env
96-
image: mher/flower
97-
container_name: signal_documentation-flower
98-
working_dir: /usr/src/signal_documentation/src
99-
command: celery -A signal_documentation flower -l info
100-
volumes:
101-
- .:/usr/src/signal_documentation
102-
ports:
103-
- "5555:5555"
104-
depends_on:
105-
- redis
106-
- celery
107-
- celery-beat
108-
10966
volumes:
11067
mysql:
11168
sdwebapp:
11269
static:
113-
celery:
114-
celery-beat:

requirements.txt

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ attrs==23.2.0; python_version >= '3.7'
77
babel==2.14.0; python_version >= '3.7'
88
beautifulsoup4==4.12.3; python_full_version >= '3.6.0'
99
billiard==4.2.0; python_version >= '3.7'
10-
celery[redis]==5.3.6
1110
certifi==2024.2.2; python_version >= '3.6'
1211
cfgv==3.4.0; python_version >= '3.8'
1312
charset-normalizer==3.3.2; python_full_version >= '3.7.0'
@@ -23,7 +22,6 @@ defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1,
2322
diff-match-patch==20230430; python_version >= '3.7'
2423
distlib==0.3.8
2524
django==4.2.10
26-
django-celery-beat==2.5.0
2725
django-cors-headers==4.3.1
2826
django-coverage-plugin==3.1.0
2927
django-crispy-forms==2.1

src/signal_documentation/celery.py

-58
This file was deleted.

src/signal_documentation/settings.py

+7-18
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
SENTRY_DSN = os.environ.get('SENTRY_DSN')
3131
if SENTRY_DSN:
3232
sentry_sdk.init(
33-
dsn = SENTRY_DSN,
34-
integrations = [DjangoIntegration(), RedisIntegration(max_data_size=0)],
35-
traces_sample_rate = float(os.environ.get('SENTRY_TRACES_SAMPLE_RATE', 1.0)),
36-
profiles_sample_rate = float(os.environ.get('SENTRY_PROFILES_SAMPLE_RATE', 1.0)),
37-
environment = (os.environ.get('SENTRY_ENVIRONMENT', 'development')),
38-
attach_stacktrace = os.environ.get('SENTRY_ATTACH_STACKTRACE', 'False').lower() in ('true', '1', 't'),
39-
debug = os.environ.get('SENTRY_DEBUG', 'False').lower() in ('true', '1', 't')
33+
dsn=SENTRY_DSN,
34+
integrations=[DjangoIntegration(), RedisIntegration(max_data_size=0)],
35+
traces_sample_rate=float(os.environ.get('SENTRY_TRACES_SAMPLE_RATE', 1.0)),
36+
profiles_sample_rate=float(os.environ.get('SENTRY_PROFILES_SAMPLE_RATE', 1.0)),
37+
environment=(os.environ.get('SENTRY_ENVIRONMENT', 'development')),
38+
attach_stacktrace=os.environ.get('SENTRY_ATTACH_STACKTRACE', 'False').lower() in ('true', '1', 't'),
39+
debug=os.environ.get('SENTRY_DEBUG', 'False').lower() in ('true', '1', 't')
4040
)
4141

4242

@@ -263,17 +263,6 @@
263263

264264
CACHE_TIME = int(os.environ.get('CACHE_TIME', 60 * 60 * 24)) # 24 hours
265265

266-
267-
# Celery
268-
# https://docs.celeryq.dev/en/stable/index.html
269-
CELERY_BROKER_URL = f"{REDIS_URL}{REDIS_DB}"
270-
271-
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
272-
CELERY_ACCEPT_CONTENT = ['application/json']
273-
CELERY_RESULT_SERIALIZER = 'json'
274-
CELERY_TASK_SERIALIZER = 'json'
275-
276-
277266
# Password validation
278267
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
279268

src/signals/tasks.py

-24
This file was deleted.

0 commit comments

Comments
 (0)