Skip to content

Commit d6d03ff

Browse files
authored
Merge pull request #962 from karrioapi/patch-2026.1.8
Patch 2026.1.8
2 parents 9c8c733 + 8ac6c67 commit d6d03ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+297
-216
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Karrio 2026.1.8
2+
3+
## Changes
4+
5+
### Fix
6+
7+
- fix: migrate to django-health-check v4.0
8+
- fix: ensure background tasks execute when no async worker is available
9+
10+
---
11+
112
# Karrio 2026.1.7
213

314
## Changes

apps/api/karrio/server/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2026.1.7
1+
2026.1.8

apps/api/karrio/server/settings/apm.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
PostHogIntegration = None
1616

1717

18-
# Health check apps settings
19-
HEALTH_CHECK_APPS = [
20-
"health_check",
21-
"health_check.db",
22-
"health_check.cache",
23-
"health_check.contrib.migrations",
24-
"health_check.contrib.psutil",
18+
# Health check settings (django-health-check v4)
19+
HEALTH_CHECK_APPS = ["health_check"]
20+
HEALTH_CHECK_CHECKS = [
21+
"health_check.Database",
22+
"health_check.Cache",
23+
"health_check.contrib.psutil.Disk",
24+
"health_check.contrib.psutil.Memory",
2525
]
2626
INSTALLED_APPS += HEALTH_CHECK_APPS
2727

apps/api/karrio/server/settings/cache.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import socket
44
from decouple import config
55
from karrio.server.settings.base import *
6-
from karrio.server.settings.apm import HEALTH_CHECK_APPS
6+
from karrio.server.settings.apm import HEALTH_CHECK_APPS, HEALTH_CHECK_CHECKS
77
from karrio.server.core.logging import logger
88

99

@@ -97,12 +97,15 @@
9797
# Cache constance values to avoid N+1 queries on each config access
9898
CONSTANCE_DATABASE_CACHE_BACKEND = "default"
9999

100-
# Django cache health check uses the cache backend directly
101-
# Only add Redis health check if REDIS_URL environment variable is set
102-
# When using granular params, the cache check is sufficient
100+
# Add Redis health check (v4: requires explicit async client instance)
101+
# Only add if REDIS_URL is set; when using granular params, the cache check is sufficient
103102
if config("REDIS_URL", default=None) is not None:
104-
HEALTH_CHECK_APPS += ["health_check.contrib.redis"]
105-
INSTALLED_APPS += ["health_check.contrib.redis"]
103+
import redis.asyncio as aioredis
104+
105+
_redis_check_client = aioredis.Redis.from_url(REDIS_CONNECTION_URL)
106+
HEALTH_CHECK_CHECKS.append(
107+
("health_check.contrib.redis.Redis", {"client": _redis_check_client})
108+
)
106109

107110
print(f"Redis cache connection initialized")
108111
elif SKIP_DEFAULT_CACHE:

apps/api/karrio/server/settings/workers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,9 @@
137137
fsync=False, # Disable forced fsync for better performance (default: False)
138138
**({"immediate": WORKER_IMMEDIATE_MODE} if WORKER_IMMEDIATE_MODE else {}),
139139
)
140+
141+
# When DETACHED_WORKER is True, the entrypoint only runs Gunicorn — no worker
142+
# process will ever consume from the SQLite queue. Auto-enable immediate mode
143+
# so tasks execute synchronously in the web process.
144+
if DETACHED_WORKER and not IS_WORKER_PROCESS and not WORKER_IMMEDIATE_MODE:
145+
HUEY.immediate = True

apps/www/openapi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ info:
1414
## Versioning
1515
1616
When backwards-incompatible changes are made to the API, a new, dated version is released.
17-
The current version is `2026.1.7`.
17+
The current version is `2026.1.8`.
1818
1919
Read our API changelog to learn more about backwards compatibility.
2020
@@ -84,7 +84,7 @@ info:
8484
All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure).
8585
API requests without authentication will also fail.
8686
title: Karrio API
87-
version: 2026.1.7
87+
version: 2026.1.8
8888
paths:
8989
/:
9090
get:

bin/deploy-hobby

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
export KARRIO_TAG="${KARRIO_TAG:-2026.1.7}"
5+
export KARRIO_TAG="${KARRIO_TAG:-2026.1.8}"
66
export SENTRY_DSN="${SENTRY_DSN:-'https://public@sentry.example.com/1'}"
77

88
SECRET_KEY=$(head -c 28 /dev/urandom | sha224sum -b | head -c 56)
@@ -22,7 +22,7 @@ echo ""
2222
if ! [ -z "$1" ]; then
2323
export KARRIO_TAG=$1
2424
else
25-
echo "What version of Karrio would you like to install? (We default to '2026.1.7')"
25+
echo "What version of Karrio would you like to install? (We default to '2026.1.8')"
2626
echo "You can check out available versions here: https://hub.docker.com/r/karrio/server/tags"
2727
read -r KARRIO_TAG_READ
2828
if [ -z "$KARRIO_TAG_READ" ]; then

bin/deploy-insiders

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
export KARRIO_TAG="${KARRIO_TAG:-2026.1.7}"
5+
export KARRIO_TAG="${KARRIO_TAG:-2026.1.8}"
66
export SENTRY_DSN="${SENTRY_DSN:-'https://public@sentry.example.com/1'}"
77

88
SECRET_KEY=$(head -c 28 /dev/urandom | sha224sum -b | head -c 56)

bin/upgrade-hobby

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else
4141
fi
4242

4343
[[ -f ".env" ]] && export $(cat .env | xargs) || (echo "No .env file found. Please create it with SECRET_KEY and DOMAIN set." && exit 1)
44-
export KARRIO_TAG="${KARRIO_TAG:-2026.1.7}"
44+
export KARRIO_TAG="${KARRIO_TAG:-2026.1.8}"
4545

4646
# get karrio scripts
4747
mkdir -p ./karrio

0 commit comments

Comments
 (0)