Skip to content
Draft
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -395,5 +395,5 @@ develop_frontend: ## same as develop, but focus on frontend only
# shut everything down
${MAKE} down env=develop

uv_lock: ## update the uv.lock file after changing pyproject.toml
uv_lock uv.lock: ## update the uv.lock file after changing pyproject.toml
${DOCKER_COMPOSE_TOOLS_CMD} run --rm tools uv lock
4 changes: 0 additions & 4 deletions checks/tasks/tls/tasks_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
from checks.tasks.tls.http import http_checks
from interface import batch, batch_shared_task, redis_id

# Workaround for https://github.com/eventlet/eventlet/issues/413 for eventlet
# while monkey patching. That way we can still catch subprocess.TimeoutExpired
# instead of just Exception which may intervene with Celery's own exceptions.
# Gevent does not have the same issue.
from internetnl import log

from checks.tasks.tls.scans import ChecksMode, cert_checks, has_daneTA, check_web_tls, check_mail_tls_multiple
Expand Down
8 changes: 4 additions & 4 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ services:
# run as root because permission need to be set on batch_results directory, drop privileges in entrypoint.sh
user: root
entrypoint: /entrypoint-worker.sh
command: celery --app internetnl worker --without-gossip --pool=eventlet --time-limit=300 --concurrency=$WORKER_CONCURRENCY
command: celery --app internetnl worker --without-gossip --pool=gevent --time-limit=300 --concurrency=$WORKER_CONCURRENCY
--queues default,celery,db_worker,ipv6_worker,mail_worker,web_worker,resolv_worker,dnssec_worker,rpki_worker,batch_main,batch_callback,batch_scheduler
# time after which a SIGKILL is sent to celery after a SIGTERM (warm shutdown), default 10s
# insufficient short grace period causes issues on batch when tasks are killed during the hourly worker restart
Expand Down Expand Up @@ -295,7 +295,7 @@ services:
- SENTRY_DSN
- SENTRY_ENVIRONMENT
- SENTRY_SERVER_NAME
# even though eventlet is used and childs are not really threads or processes, this settings reduces
# even though gevent is used and childs are not really threads or processes, this settings reduces
# issues with high memory usage, probably because some objects are freed?
- CELERYD_MAX_TASKS_PER_CHILD=100

Expand All @@ -317,7 +317,7 @@ services:
# disable swap by settings swap to the memory limit
memswap_limit: $WORKER_NASSL_MEMORY_LIMIT

command: celery --app internetnl worker --without-gossip --pool=eventlet --time-limit=300 --concurrency=$WORKER_CONCURRENCY
command: celery --app internetnl worker --without-gossip --pool=gevent --time-limit=300 --concurrency=$WORKER_CONCURRENCY
--queues nassl_worker,batch_nassl
# set hostname for Sentry
hostname: worker-nassl
Expand All @@ -334,7 +334,7 @@ services:
deploy:
replicas: $WORKER_SLOW_REPLICAS

command: celery --app internetnl worker --without-gossip --pool=eventlet --time-limit=600 --concurrency=$WORKER_SLOW_CONCURRENCY
command: celery --app internetnl worker --without-gossip --pool=gevent --time-limit=600 --concurrency=$WORKER_SLOW_CONCURRENCY
--queues slow_db_worker,batch_slow

# celery task queue
Expand Down
10 changes: 0 additions & 10 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#!/usr/bin/env python3

#from gevent import monkey
#monkey.patch_all(aggressive=True)
#from psycogreen.gevent import patch_psycopg
#patch_psycopg()

#import eventlet
#eventlet.monkey_patch()
#from psycogreen.eventlet import patch_psycopg
#patch_psycopg()

import os
import sys

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies = [
"django-redis<5",
"django-statsd-mozilla",
"dnspython",
"eventlet",
"forcediphttpsadapter",
"gevent",
"gitpython",
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def pytest_generate_tests(metafunc):
# -----------------------------------------------------------------------------


@pytest.fixture(params=["prefork", "gevent", "eventlet"])
@pytest.fixture(params=["prefork", "gevent"])
def custom_celery_worker(request):
"""Spawn celery worker to be used during test.

Expand Down
4 changes: 2 additions & 2 deletions tests/test_tasks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# this tests if a task can be executed using gevent, eventlet, and to see if tasks with an unbound context also function
# this tests if a task can be executed using gevent, and to see if tasks with an unbound context also function
# This due to hanging tasks
# import os

Expand All @@ -25,7 +25,7 @@ def wait_for_result(task_id):
# @pytest.mark.skipif(os.getenv("GITHUB_ACTIONS", "") == "True", reason="Redis hang? at github actions")
# @pytest.mark.skip
def test_various_workers(custom_celery_worker):
"""Simple test that starts a task on all different worker-types (gevent, prefork, eventlet) to
"""Simple test that starts a task on all different worker-types (gevent, prefork) to
verify that operations are normal. This requires a redis server to be reachable on the configured port in
settings.py."""

Expand Down
15 changes: 0 additions & 15 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading