Conversation
* refactor: show function name as it runs * feat: log func name when processed Co-authored-by: Noortheen Raja <jnoortheen@gmail.com>
Migrate codecov to coveralls
* Fix readthedocs file * remove trigger from test workflow
* Update django docs links to 4.0 * Update Django Q to Django Q2 * Use different theme to make difference more clear between the original and this forked one * Added info notice about this fork * Some small layout/typo fixes
Co-authored-by: ethemguner
Co-authored-by: Marc Sabatier <marc@sabatier.online>
Co-authored-by: Marc Sabatier <marc@sabatier.online>
* Add the group column to OrmQ admin page * Add group field to tasks list and search_field * Add search by name to Schedule admin page * Limit succesful task history per schedule with SAVE_LIMIT_GROUP config * Improve ScheduleAdmin list view performance Co-authored-by: Marc Sabatier <marc@sabatier.online>
* feat: option to save tasks per group/func/name * test: update tests for save limit * fix: convert func when save-limit checking when passed as function it needs to be converted to work * Add warning if option is not valid Co-authored-by: Noortheen Raja <jnoortheen@gmail.com>
Instead of checking if the django-q logger has any handlers directly, use the hasHandlers [1] method, which will check if any parent loggers have handlers as well. This fixes a bug where django-q configures it's own logging even though the root logger has a handler set 1. https://docs.python.org/3/library/logging.html#logging.Logger.hasHandlers Co-authored-by: Wesley Ellis <wellis@benchsci.com>
Co-authored-by: Rajeev KL <rajeev@labmoneta.io>
* fix django q2 install command and remove space * remove warnings for very old versions
having build-system config helps installing this without setup.py built
…ix (#18) task names in logs
* delete old code * remove imports
…t. 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>
…ization (#274) * move timeout function to class to allow customization * format * fix format
* 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
* fix: Fix incorrect signal import * lint --------- Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
* async_iter: fix BadSignature after the default Django cache expires * lint
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>
* 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>
#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: #305 (comment) * 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 #305 (comment) 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 #305 (comment) 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 #305 (comment)
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.
* update matrix * add support for 3.14
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.