1412 Commits

Author SHA1 Message Date
Stan
b0c6753462 Release v1.11.1 v1.11.1 2026-08-26 04:46:29 +02:00
David Macario
d97b27901b Fix cluster requesting hardcoded unix-only fork context (#347) 2026-08-26 04:39:33 +02:00
Stan Triepels
fa935f89ab Show test coverage in github pull request comment (#344) 2026-08-14 17:26:55 +02:00
Stan Triepels
9e576b85e6 Swap localstorage to ministack (#343) 2026-08-14 05:37:10 +02:00
Stan
1941f1e3f0 Release v1.11.0 v1.11.0 2026-08-10 04:17:05 +02:00
tugofpeas
97ea3c89a5 Postpone SECRET_KEY evaluation to the qcluster command execution (#332)
* Suppress ImproperlyConfigured within Conf, allowing the exception to be raised specifically during the 'qcluster' command instead.

This ensures build scripts and workflows can freely execute other Django commands (e.g., 'python manage.py collectstatic') without failing due to a missing/empty secret key.

* Closes #279

Co-authored-by: Tug of Peas <19413623+tugofpeas@users.noreply.github.com>
2026-08-09 03:20:51 +02:00
Stan Triepels
b2651ce86c Add django 6.1 support (#340) 2026-08-06 03:00:32 +02:00
Stan Triepels
fc81787612 Add support for python 3.13 and 3.14 (#338)
* update matrix

* add support for 3.14
2026-08-02 03:46:04 +02:00
Stan Triepels
ea839ab664 Migrate poetry to uv (#337) 2026-08-01 05:11:49 +02:00
Paul Backhouse
0e4c163d79 Add croniter as optional extra. (#336)
Allows django-q2[croniter] to be specified in a dependant's pyproject.toml.
Required because dependant may not explicitly use croniter in code
and so it can be flagged as unused.
2026-07-22 15:37:18 +02:00
Andy Galasso
480b77dfe4 AttributeError when start_event is None, and guard process faster stop (#305)
* AttributeError when start_event is None, and guard process faster stop

This commit has two related fixes that come into play when frequently
shutting down and restarting the cluster.

If a SIGINT or SIGTERM signal is received while the main process is
waiting for the sentinel process to set start_event, the signal
handler sets start_event to None, and the loop that polls start_event
will raise an unhandled AttributeError attempting to check
start_event.is_set().

The second issue is that the guard process sleeps for the guard cycle
interval in each iteration before checking the stop event, preventing
the guard cycle from terminating until the sleep completes. The
cluster can be made more responsive to a shutdown request by using
the event's wait(cycle) method rather than time.sleep(cycle) so the
process wakes immediately when the event is set.

The commit also fixes the case where the guard process sleeps for an
extra cycle when the cycle counter happens to have been reset to zero
on the loop iterations when the scheduler is called.

This fix helps in our environment where we are frequently stopping
and starting the cluster and where we have increased the guard
cycle setting to several seconds.

* Add sentinel premature death check while waiting for sentinel to start.

Suggested by github copilot [here](https://github.com/django-q2/django-q2/pull/305/changes#r3143964420)

* Add test case test_cluster_early_stop

Add a test case to validate stopping the cluster before the
sentinel has set the cluster's start_event.

The test deterministically triggers the AttributeError when
start_event is None (without the PR's fix in cluster.py).

As requested by copilot: https://github.com/django-q2/django-q2/pull/305#discussion_r3143964399

* Add test test_cluster_stop_responsive

Ensure that stopping the cluster is responsive and does not wait for a full
GUARD_CYCLE to stop the cluster.

As requested by copilot: https://github.com/django-q2/django-q2/pull/305/changes#r3143964414

* Address copilot review comments.

1. Do not raise RuntimeError if sentinel early exit was caused by
   SIGINT/SIGTERM stopping the cluster while waiting for the
   sentinel to start.
   Addresses https://github.com/django-q2/django-q2/pull/305#discussion_r3298618046

2. Ensure that the monkeypatched broker instance remains pickleable
   so the test_cluster_early_stop test will also work on platforms
   that use the spawn Process start method.
   Addresses https://github.com/django-q2/django-q2/pull/305#discussion_r3298618086

3. Do not allow the test_cluster_early_stop test to hang if the
   sentinel process or main test process terminates unexpectedly
   without setting the sentinel_event or test_event.
   Addresses https://github.com/django-q2/django-q2/pull/305#discussion_r3298618102
2026-05-26 00:07:53 +02:00
Stan
a699578c34 Release v1.10.0 v1.10.0 2026-05-01 19:34:38 +02:00
Islam Asabaev
5975a2d081 feat: add ru locale and improve translations (#320)
* Add ru locale

* fix

* fix: remove duplicate

* Add field labels and continue ru locale

* fix: Add ru gettext for queue columns, short result column, and OrmQ field labels

* fix: locale paths in translation files

* chore: format code with ruff

* chore: format code with ruff

* fix: correct time_taken usage in admin

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update django_q/locale/de/LC_MESSAGES/django.po

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update django_q/locale/tr/LC_MESSAGES/django.po

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: clear fuzzy markers

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-25 01:06:07 +02:00
Islam Asabaev
936fdd10b1 Update Python base image to 3.9-slim-bookworm (#325)
* issue: gh-324
2026-04-18 16:48:55 +02:00
Nick Yuan
fab97463c2 Fix unbounded growth of Broker.set_stat cluster master list (#322)
Prune stale entries from the master list on new cluster registration
and only write the list when membership changes (with timeout=None).

Before this fix, set_stat was append-only — dead cluster keys accumulated
forever because the only cleanup path (get_stats) runs only from the
monitor UIs. On DatabaseCache backends this rewrote the growing pickled
list to Postgres on every heartbeat, producing measurable egress.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 00:24:43 +02:00
Sophile
1abdc5b653 Convert queue size and count to string in monitor (#319) 2026-03-27 23:00:35 +01:00
Seba
01df35c923 Don't close DB connection if async_task was called with sync=True (#301) 2026-03-12 15:33:19 +01:00
Niko
573b8da528 Update Django Q2 compatibility information (#316) 2026-02-16 22:59:51 +01:00
Yibo Li
8a563d289d feat:add Simplified Chinese Translation (#314) 2026-01-14 23:58:54 +01:00
Marcin Bachry
1b0f71a39b Fix BadSignature after the default Django cache expires (#311)
* async_iter: fix BadSignature after the default Django cache expires

* lint
2026-01-08 23:27:03 +01:00
prollings
b51575a4b0 Add post_execute_in_worker signal (#309) 2025-12-10 16:54:14 +01:00
xuheng.zong
fd927087f1 fix: Fix incorrect signal import (#308)
* fix: Fix incorrect signal import

* lint

---------

Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
2025-12-08 21:10:10 +01:00
Stan
386e04171b Release v1.9.0 v1.9.0 2025-12-04 23:04:52 +01:00
Luke Plant
0054535624 Django 6.0 support (#307)
* Remove upper bound on Django version.

This allows it to be installed alongside Django 6 and later.

See https://iscinumpy.dev/post/bound-version-constraints/

* Run tests on Django 6.0 / Python 3.12
2025-12-04 17:15:18 +01:00
Salvo 'LtWorf' Tomaselli
09e65da5b3 Fix to make tests work with redis-py > 5 (#282) 2025-07-04 02:13:46 +02:00
Stan
65d2548e98 Release v1.8.0 v1.8.0 2025-04-25 16:30:51 +02:00
Stan Triepels
cbe51f995c Move timeout function from ORM broker into class to allow easy customization (#274)
* move timeout function to class to allow customization

* format

* fix format
2025-04-23 15:44:37 +02:00
Adam Johnson
0090a6f411 Update tested versions, add python 3.13 support and django 5.2 support. Drop python 3.8 support (#271)
* Update tested versions

* Remove f string

* Fix second `format_html`

---------

Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
2025-04-16 01:48:51 +02:00
Fernando Karchiloff
a154fd658a Avoid creating task run on Scheduler creation (#268) 2025-03-12 23:31:00 +01:00
Adam Johnson
81f2531e3e Remove disque from CI (#270) 2025-03-12 23:28:59 +01:00
Stan Triepels
c464751ae9 Delete deprecated imports and unwrapping (#261)
* delete old code

* remove imports
2025-01-12 03:40:18 +01:00
Stan
144536cbe4 Release v1.7.6 v1.7.6 2025-01-12 02:25:29 +01:00
Stan Triepels
7e72b68c7f Make poetry version fixed in CI (#260) 2025-01-12 02:22:14 +01:00
Stan
404932117e Release v1.7.5 2025-01-12 01:57:13 +01:00
Anthony Hivert
ddc1aa2de1 perf: avoid checking success tasks when save limit is disabled (#255)
- avoid extra queries when checking the count of success in db
2025-01-04 02:31:30 +01:00
mhaehnel
351bf66d71 Fix install path for CHANGELOG.md (#258)
The file should not be installed directly in site-packages. Use the
correct include syntax to include them into the source distribution
package only.
2025-01-02 01:52:07 +01:00
Stan
ccd760a69f Release v1.7.4 v1.7.4 2024-11-03 15:26:11 +01:00
Alberto
fb23b6b825 Fix 'receive_message_wait_time_seconds' SQS broker management (#243)
* Fix 'receive_message_wait_time_seconds' SQS broker management

* Remove socket volume from localstack container
2024-11-03 15:04:35 +01:00
P-EB
35c911080b Fix BROKER_CLASS monkeypatch in test_brokers (#239) 2024-10-21 17:51:27 +02:00
P-EB
81058fc1cf Decrease the MAX_RSS set in test_cluster::test_max_rss (#240) 2024-10-21 17:50:30 +02:00
Stan
505eb8d537 Release v1.7.3 v1.7.3 2024-10-15 04:17:28 +02:00
blockisec
dcfe5b6650 Fix missing ack_id when finishing task (#224)
* Update monitor.py

* format

---------

Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
2024-10-11 15:03:18 +02:00
Paulo Coutinho
c3b49cca25 Only trigger prometheus if configured (#231)
* fix prometheus integration

* fix prometheus integration

* Add also lowercase option

As they seem to support that too: d7c9cd88c7/prometheus_client/multiprocess.py (L166-L167)

* format

---------

Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
2024-10-11 04:09:17 +02:00
Knuth
c1e00b09cb Fix type check for args in scheduler.py E721 (#233) 2024-10-10 16:10:43 +02:00
Knuth
8e403d0136 Refactor timeout handling to handle AttributeError and ValueError for Windows users (#234) 2024-10-10 16:09:57 +02:00
Stan Triepels
337a5782d9 Catch missing SEGALRM with AttributeError instead of ValueError (#223) 2024-09-22 04:12:38 +02:00
Stan
2c456cd0aa Release v1.7.2 v1.7.2 2024-09-10 00:16:18 +02:00
Stan Triepels
8f54e5d5ae Add twine check and fix readme (#216)
* Add twine check

* add poetry to install

* move up remove black/flake formatting

* fix path

* fix?

* fix rst?

* add rstcheck

* test all files?

* all

* remove complaining image

* only check readme

* remove not needed dependencies
2024-09-10 00:10:14 +02:00
Stan
689c881178 Release v1.7.1 v1.7.1 2024-09-08 04:20:13 +02:00
Stan
923c5daa73 Release v1.7.0 v1.7.0 2024-09-08 03:52:37 +02:00