Skip to content

Commit 57ba3cd

Browse files
committed
Merge branch 'master' into feature-exclude-future-jobs-from-queue-depth
2 parents 7322827 + 86bfc20 commit 57ba3cd

File tree

5 files changed

+26
-38
lines changed

5 files changed

+26
-38
lines changed

.github/workflows/ci.yml

+12-16
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
13-
django: ["3.2", "4.0", "4.1", "4.2", "5.0"]
12+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
django: ["4.2", "5.0", "5.1"]
1414
exclude:
15-
- python: "3.11"
16-
django: "3.2"
17-
- python: "3.12"
18-
django: "3.2"
19-
- python: "3.11"
20-
django: "4.0"
21-
- python: "3.12"
22-
django: "4.0"
23-
- python: "3.8"
15+
- python: "3.9"
2416
django: "5.0"
2517
- python: "3.9"
18+
django: "5.1"
19+
- python: "3.13"
20+
django: "4.2"
21+
- python: "3.13"
2622
django: "5.0"
2723
database_url:
2824
- postgres://runner:password@localhost/project
@@ -45,19 +41,19 @@ jobs:
4541
steps:
4642
- name: Start MySQL
4743
run: sudo systemctl start mysql.service
48-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v4
4945
- name: Install system Python build deps for psycopg2
50-
run: sudo apt-get install python3-dev python3.11-dev
46+
run: sudo apt-get install python3-dev
5147
- name: Set up Python ${{ matrix.python }}
52-
uses: actions/setup-python@v2
48+
uses: actions/setup-python@v5
5349
with:
54-
python-version: ${{ matrix.python }}
50+
python-version: ${{ matrix.python }}.*
5551
- name: Upgraded pip
5652
run: pip install --upgrade pip
5753
- name: Install dependencies
5854
run: pip install -r test-requirements.txt
5955
- name: Install Django
60-
run: pip install -U django==${{ matrix.django }}
56+
run: pip install -U django~=${{ matrix.django }}.0
6157
- name: Run tests
6258
run: python manage.py test
6359
- name: Run black

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Simple database-backed job queue. Jobs are defined in your settings, and are pro
77
Asynchronous tasks are run via a *job queue*. This system is designed to support multi-step job workflows.
88

99
Supported and tested against:
10-
- Django 3.2, 4.0, 4.1, 4.2, 5.0
11-
- Python 3.8, 3.9, 3.10, 3.11, 3.12
10+
- Django 4.2, 5.0, 5.1
11+
- Python 3.9, 3.10, 3.11, 3.12, 3.13
1212

1313
## Getting Started
1414

django_dbq/tests.py

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from datetime import datetime, timedelta
2-
import mock
1+
from datetime import datetime, timedelta, timezone as datetime_timezone
2+
from unittest import mock
33

44
import freezegun
5-
from django.core.management import call_command, CommandError
5+
from django.core.management import call_command
66
from django.test import TestCase
77
from django.test.utils import override_settings
88
from django.utils import timezone
@@ -13,14 +13,6 @@
1313
from io import StringIO
1414

1515

16-
try:
17-
utc = timezone.utc
18-
except AttributeError:
19-
from datetime import timezone as datetime_timezone
20-
21-
utc = datetime_timezone.utc
22-
23-
2416
def test_task(job=None):
2517
pass # pragma: no cover
2618

@@ -302,7 +294,8 @@ def test_gets_jobs_in_priority_and_date_order(self):
302294
def test_ignores_jobs_until_run_after_is_in_the_past(self):
303295
job_1 = Job.objects.create(name="testjob")
304296
job_2 = Job.objects.create(
305-
name="testjob", run_after=datetime(2021, 11, 4, 8, tzinfo=utc)
297+
name="testjob",
298+
run_after=datetime(2021, 11, 4, 8, tzinfo=datetime_timezone.utc),
306299
)
307300

308301
with freezegun.freeze_time(datetime(2021, 11, 4, 7)):

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
author_email = "[email protected]"
1717
license = "BSD"
1818
install_requires = [
19-
"Django>=3.1",
19+
"Django>=4.2",
2020
]
2121

2222
long_description = """Simple database-backed job queue system"""
@@ -82,5 +82,5 @@ def get_package_data(package):
8282
package_data=get_package_data(package),
8383
install_requires=install_requires,
8484
classifiers=[],
85-
python_requires=">=3.6"
85+
python_requires=">=3.9"
8686
)

test-requirements.txt

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
mysqlclient==1.4.6
2-
freezegun==0.3.12
3-
mock==3.0.5
4-
dj-database-url==0.5.0
5-
psycopg2==2.9.5
6-
black==24.3.0
1+
mysqlclient==2.2.7
2+
freezegun==1.5.1
3+
dj-database-url==2.3.0
4+
psycopg2==2.9.10
5+
black==24.10.0

0 commit comments

Comments
 (0)