Skip to content

Commit 18f64f4

Browse files
committed
Merge branch 'master' of github.com:rq/django-rq
2 parents e69715e + 4055193 commit 18f64f4

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
python-version: ["3.8", "3.9", "3.10"]
20-
django-version: ["3.2.16", "4.0.8", "4.1.3"]
20+
django-version: ["3.2.16", "4.0.8", "4.1.3", "4.2"]
2121

2222
steps:
2323
- uses: actions/checkout@v3

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ RQ uses Python's ``logging``, this means you can easily configure ``rqworker``'s
378378
"handlers": {
379379
"rq_console": {
380380
"level": "DEBUG",
381-
"class": "rq.utils.ColorizingStreamHandler",
381+
"class": "rq.logutils.ColorizingStreamHandler",
382382
"formatter": "rq_console",
383383
"exclude": ["%(asctime)s"],
384384
},
@@ -503,7 +503,7 @@ Running Tests
503503

504504
To run ``django_rq``'s test suite::
505505

506-
`which django-admin.py` test django_rq --settings=django_rq.tests.settings --pythonpath=.
506+
`which django-admin` test django_rq --settings=django_rq.tests.settings --pythonpath=.
507507

508508
===================
509509
Deploying on Ubuntu

django_rq/tests/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"rq_console": {
8181
"level": "DEBUG",
8282
# "class": "logging.StreamHandler",
83-
"class": "rq.utils.ColorizingStreamHandler",
83+
"class": "rq.logutils.ColorizingStreamHandler",
8484
"formatter": "rq_console",
8585
"exclude": ["%(asctime)s"],
8686
},

django_rq/tests/test_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_enqueue_jobs(self):
167167
self.assertIsNone(last_job.enqueued_at)
168168

169169
# We want to force-enqueue this job
170-
self.client.post(reverse('rq_enqueue_job', args=[queue_index, last_job.id]))
170+
response = self.client.post(reverse('rq_enqueue_job', args=[queue_index, last_job.id]))
171171

172172
# Check that job is updated correctly
173173
last_job = queue.fetch_job(last_job.id)

django_rq/views.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,12 @@ def enqueue_job(request, queue_index, job_id):
506506
job = Job.fetch(job_id, connection=queue.connection)
507507

508508
if request.method == 'POST':
509-
queue.enqueue_job(job)
509+
try:
510+
# _enqueue_job is new in RQ 1.14, this is used to enqueue
511+
# job regardless of its dependencies
512+
queue._enqueue_job(job)
513+
except AttributeError:
514+
queue.enqueue_job(job)
510515

511516
# Remove job from correct registry if needed
512517
if job.get_status() == JobStatus.DEFERRED:

0 commit comments

Comments
 (0)