Compare commits

...
Author SHA1 Message Date
Stan 4f4775c689 fix test 2026-08-14 05:27:02 +02:00
Stan fde502d8a0 fix endpoint 2026-08-14 04:50:31 +02:00
Stan 8184bf579c overwrite endpoint in container 2026-08-14 04:46:27 +02:00
Stan 50b3da87d4 make env variables available in each step 2026-08-14 04:44:32 +02:00
Stan 7027a9dd7e add config 2026-08-14 04:38:51 +02:00
Stan 9e32b15d8a disable healthcheck 2026-08-14 04:34:56 +02:00
Stan 55bdeb4d33 test file fixes for actions 2026-08-14 04:30:27 +02:00
Stan 73c35cb5c7 swap localstorage to ministack 2026-08-14 04:24:25 +02:00
Stan 1941f1e3f0 Release v1.11.0 2026-08-10 04:17:05 +02:00
9 changed files with 53 additions and 45 deletions
+24 -3
View File
@@ -6,6 +6,16 @@ on:
pull_request:
branches:
- master
env:
MONGO_HOST: "127.0.0.1"
REDIS_HOST: "127.0.0.1"
AWS_ENDPOINT_URL: http://localhost:4566
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: "test"
AWS_SECRET_ACCESS_KEY: "test"
AWS_DEFAULT_REGION: "us-east-1"
jobs:
lint:
runs-on: ubuntu-latest
@@ -68,6 +78,18 @@ jobs:
ports:
- 6379:6379
options: --entrypoint redis-server
aws:
image: ministackorg/ministack:1.4.16
env:
SERVICES: sqs
MINISTACK_HOST: aws
# options: >-
# --health-cmd "wget -qO- http://localhost:4566/_ministack/ready || exit 1"
# --health-interval 2s
# --health-retries 15
# --health-timeout 5s
ports:
- 4566:4566
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
@@ -79,12 +101,11 @@ jobs:
python -m pip install uv==0.12.1
uv sync --extra testing --python ${{ matrix.python-version }}
uv pip install "django~=${{ matrix.django }}a1"
- name: Create SQS queue
run: aws sqs create-queue --queue-name testing
- name: Run Tests
run: |
uv run pytest --cov=./django_q --cov-report=xml
env:
MONGO_HOST: "127.0.0.1"
REDIS_HOST: "127.0.0.1"
- name: Upload to coveralls
run: |
python -m pip install coveralls
+10
View File
@@ -1,5 +1,15 @@
# Changelog
## [v1.11.0](https://github.com/django-q2/django-q2/tree/v1.11.0) (2026-08-10)
- AttributeError when start_event is None, and guard process faster stop (#305) https://github.com/django-q2/django-q2/pull/305
- Add croniter as optional extra. (#336) https://github.com/django-q2/django-q2/pull/336
- Migrate poetry to uv (#337) https://github.com/django-q2/django-q2/pull/337
- Add support for python 3.13 and 3.14 (#338) https://github.com/django-q2/django-q2/pull/338
- Add django 6.1 support (#340) https://github.com/django-q2/django-q2/pull/340
- Postpone SECRET_KEY evaluation to the qcluster command execution (#332) https://github.com/django-q2/django-q2/pull/332
## [v1.10.0](https://github.com/django-q2/django-q2/tree/v1.10.0) (2026-05-01)
- fix: Fix incorrect signal import (#308) https://github.com/django-q2/django-q2/pull/308
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
# Note that this file needs to have the executable bit set for it to work with later localstack implementations.
export DEFAULT_REGION=us-west-2
create_sqs() {
QUEUE_NAME="$1"
TIMEOUT=${2:-60}
DL_QUEUE_URL=$(awslocal sqs create-queue --queue-name "dl-$QUEUE_NAME" --query QueueUrl --output text)
echo ">>> Created $DL_QUEUE_URL queue!"
DL_QUEUE_ARN=$(awslocal sqs get-queue-attributes --queue-url "$DL_QUEUE_URL" --attribute-names QueueArn --query Attributes.QueueArn --output text)
awslocal sqs create-queue --queue-name "$QUEUE_NAME" --attributes '{
"RedrivePolicy": "{\"deadLetterTargetArn\": \"'"$DL_QUEUE_ARN"'\",\"maxReceiveCount\":\"3\"}",
"VisibilityTimeout": "'"$TIMEOUT"'"
}'
}
# Create SQS queues
create_sqs testing
@@ -0,0 +1 @@
aws sqs create-queue --queue-name testing
+1 -1
View File
@@ -1,3 +1,3 @@
VERSION = (1, 10, 0)
VERSION = (1, 11, 0)
__all__ = ["conf", "cluster", "models", "tasks"]
+3 -6
View File
@@ -172,9 +172,6 @@ def test_ironmq(monkeypatch):
broker.delete_queue()
@pytest.mark.skipif(
not os.getenv("AWS_ACCESS_KEY_ID"), reason="requires AWS credentials"
)
def test_sqs(monkeypatch):
monkeypatch.setattr(
Conf,
@@ -188,6 +185,7 @@ def test_sqs(monkeypatch):
)
# check broker
broker = get_broker(list_key="testing")
broker.purge_queue()
assert "receive_message_wait_time_seconds" in Conf.SQS
assert "aws_region" in Conf.SQS
assert broker.ping() is True
@@ -224,8 +222,9 @@ def test_sqs(monkeypatch):
assert broker.dequeue() is None
# fail
broker.enqueue("test")
task = None
while task is None:
task = broker.dequeue()[0]
task = broker.dequeue()
broker.fail(task[0][0])
# bulk test
for _ in range(10):
@@ -235,8 +234,6 @@ def test_sqs(monkeypatch):
for task in tasks:
assert task is not None
broker.acknowledge(task[0])
# duplicate acknowledge
broker.acknowledge(task[0])
assert broker.lock_size() == 0
# delete queue
broker.enqueue("test")
+2 -2
View File
@@ -73,9 +73,9 @@ author = "Ilan Steemers, Stan Triepels"
# built documents.
#
# The short X.Y version.
version = "1.10"
version = "1.11"
# The full version, including alpha/beta/rc tags.
release = "1.10.0"
release = "1.11.0"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "uv_build"
[project]
name = "django-q2"
version = "1.10.0"
version = "1.11.0"
packages = [
{ include = "django_q" },
]
@@ -33,11 +33,11 @@ classifiers = [
"Operating System :: MacOS",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP",
"Topic :: System :: Distributed Computing",
"Topic :: Software Development :: Libraries :: Python Modules",
+10 -12
View File
@@ -15,20 +15,18 @@ services:
aws:
container_name: aws
image: localstack/localstack:3.4.0
image: ministackorg/ministack:1.4.16
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # External services port range
- "127.0.0.1:4566:4566"
environment:
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION:-us-west-2}
DEFAULT_REGION: ${AWS_DEFAULT_REGION:-us-west-2}
SQS_ENDPOINT_STRATEGY: path
MINISTACK_HOST: aws
SERVICES: sqs
LOCALSTACK_HOST: aws
DEBUG: 1
LS_LOG: trace
volumes:
- ./containers/localstack:/etc/localstack/init/ready.d
- ./containers/ministack:/docker-entrypoint-initaws.d
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4566/_ministack/ready"]
interval: 2s
retries: 15
networks:
- main
@@ -38,10 +36,10 @@ services:
context: .
environment:
AWS_ENDPOINT_URL: http://aws:4566
AWS_REGION: ${AWS_REGION:-us-west-2}
AWS_REGION: ${AWS_REGION:-us-east-1}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-test}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-test}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION:-us-west-2}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION:-us-east-1}
volumes:
- .:/app
depends_on: