Skip to content
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 Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.15-slim

# Logs go straight to the container log instead of being block-buffered.
ENV PYTHONUNBUFFERED=1
Expand Down
12 changes: 4 additions & 8 deletions miss_islington/tasks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio
import logging
import os
import ssl
import subprocess

import aiohttp
Expand All @@ -20,18 +19,15 @@

app = celery.Celery("backport_cpython")

# REDIS_URL on cabotage, HEROKU_REDIS_MAROON_URL on Heroku. Fail at import if
# neither is set rather than letting celery fall back to a local amqp broker.
REDIS_URL = os.environ.get("REDIS_URL") or os.environ["HEROKU_REDIS_MAROON_URL"]
# Fail at import if REDIS_URL is not set rather than letting celery fall back
# to a local amqp broker. TLS settings (ssl_cert_reqs, ssl_ca_certs) are
# carried as query parameters in the rediss:// URL.
REDIS_URL = os.environ["REDIS_URL"]

app.conf.update(
broker_url=REDIS_URL,
result_backend=REDIS_URL,
broker_connection_retry_on_startup=True,
# Used for Heroku's self-signed rediss:// URL. On cabotage the ssl_* query
# parameters in REDIS_URL take precedence over these settings.
broker_use_ssl={"ssl_cert_reqs": ssl.CERT_NONE},
redis_backend_use_ssl={"ssl_cert_reqs": ssl.CERT_NONE},
)

cache = cachetools.LRUCache(maxsize=500)
Expand Down
1 change: 0 additions & 1 deletion runtime.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from cherry_picker import cherry_picker

os.environ.setdefault("HEROKU_REDIS_MAROON_URL", "someurl")
os.environ.setdefault("REDIS_URL", "redis://localhost")

from miss_islington import tasks

Expand Down
Loading