Commit Graph

616 Commits

Author SHA1 Message Date
Stan Triepels
9ace854290 Save limit per group/func/name (#12)
* 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>
2022-10-15 01:56:41 +02:00
Stan Triepels
e3f959c258 Admin improvements (#11)
* 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>
2022-10-14 17:13:48 +02:00
Stan Triepels
4aa6325ae8 Replace use of eval() by ast.parse() + ast.literal_eval() (#10)
Co-authored-by: Marc Sabatier <marc@sabatier.online>
2022-10-14 16:04:38 +02:00
Stan Triepels
803618da03 Fix connection issues with CONN_MAX_AGE > 0 (#9)
Co-authored-by: Marc Sabatier <marc@sabatier.online>
2022-10-14 02:08:48 +02:00
Stan Triepels
1edb426541 Feat: Add Turkish translation (#8)
Co-authored-by: ethemguner
2022-10-14 01:52:05 +02:00
Stan Triepels
c4ebfc66b9 Show function name in log when running task (#3)
* refactor: show function name as it runs

* feat: log func name when processed

Co-authored-by: Noortheen Raja <jnoortheen@gmail.com>
2022-09-17 01:48:07 +02:00
Ilan Steemers
f8cd136668 Post execute signal and tests (#580)
* adds post_execute signal and tests

* Updates signal docts

* Fixes typo in docs
2021-06-20 15:43:08 +02:00
Ilan Steemers
4a8ef8f388 Getting ready for 1.3.9 2021-06-10 18:40:27 +02:00
Ilan Steemers
4df036dc9c Autofield (#574)
* Adds autofield default

* linting

* Updates packages
2021-06-10 15:42:21 +02:00
Nurettin Onur TUĞCU
410327bff4 Update __init__.py (#572)
Fixes 
```
RemovedInDjango41Warning: 'django_q' defines default_app_config = 'django_q.apps.DjangoQConfig'. Django now detects this configuration automatically. You can remove default_app_config.
```
2021-06-09 12:27:15 +02:00
Ilan Steemers
c47786b6e2 Getting ready for 1.3.8 2021-06-08 13:02:30 +02:00
Ilan Steemers
15155c7a99 Build improvements (#569)
* Black linting

* Adding Black to dev dependencies and upping minimal python to 3.6.2 for compatibility

* Updating packages

* Removing pip-tools input and exporting requirements with poetry

* Deleting old setup files and test runner

* Trying 1.3.7

* Looser extras requirements to prevent conflicts

* Sorted imports with isort

* Added iSort to dev dependencies

* Fixes localtime for naive setups
2021-05-30 17:10:07 +02:00
Alexandre Xavier
71d4b726ea Feature/improves multiple databases support (#561)
* feat: adds docker local files to ignore

* feat: adds replica key to django q settings

* feat: adds multiple database routers testing utility

* feat: ensures scheduler works with multiple databases and replicas

* feat: adds docker image to support containerized development

* refactor: removes unnecessary import

* style: improves import styling

* docs: adds replica setting to configure documentation
2021-05-23 15:10:31 +02:00
nittolese
8d49825d40 Fix #422 (#556) 2021-05-14 13:49:50 +02:00
Kenny Heinonen
1eb5cf4b9b Fixes #314 - Convert func to string before saving task in databse so that resubmitting failed task works (#554) 2021-05-14 13:48:08 +02:00
Kenny Heinonen
728a1b85d0 Add "qmemory" command (#553)
* Add qmemory command

* Update README, add test

* Redesign qmemory

* Add optional argument to show each worker's memory usage

* Add --workers argument to test_qmemory
2021-05-14 13:44:40 +02:00
Dimitri
957f807598 Allow tasks to be scheduled on a specific cluster (#555)
* Allows schedule by cluster

* Update docs

* Add example in doc

* Fixes cluster field must be blank

* Adds cluster arg to schedule func

* Adds cluster field in list_display/filter for admin

* Uses Q filter to fetch schedule

* Fixes ref in doc

* Adds tests
2021-05-14 13:42:54 +02:00
Ilan Steemers
8c51f1fb8b Merge remote-tracking branch 'origin/master' 2021-05-07 17:28:49 +02:00
Kenny Heinonen
ad77ad7512 Fixes #225 (#552) 2021-05-07 17:26:41 +02:00
Ilan Steemers
59663de761 Getting ready for 1.3.6 2021-05-07 17:21:04 +02:00
Ilan Steemers
de9ba04602 Fixes deprecated count method (#549)
* Replaces deprecated count with count_documents

* Uses new re_path instead of url()
2021-05-01 16:23:37 +02:00
Gouri Javed
e205674d31 added long polling support (#506)
* added long pooling support for  sqs broker

* changed the parameter name

* added long polling support ,

introduce new parameter in broker sqs block
parameter for long polling is receive_message_wait_time_seconds

eg :
Q_CLUSTER = {
      'name': 'test-queue',
      'sqs': {
         'aws_region': AWS_S3_REGION_NAME,
         'aws_access_key_id': AWS_ACCESS_KEY_ID,
         'aws_secret_access_key': AWS_SECRET_ACCESS_KEY,
         'receive_message_wait_time_seconds':20
     }
}

* added receive_message_wait_time_seconds parameter in test_broker.py

Co-authored-by: Javed Gouri <you@example.com>
2021-03-21 12:04:16 +01:00
weiyang
1869a94118 Use 'timezone.localtime()' when calculating the next run time (#520)
Signed-off-by: weiyang <weiyang.ones@gmail.com>
2021-03-21 12:02:22 +01:00
Ilan Steemers
ef3cffb738 Getting ready for 1.3.5 2021-02-26 14:12:24 +01:00
Ruben
7892aef70a Add a warning for misconfiguration. (#509)
* Add a warning  for misconfiguration.

As specified in the docs, by default the settings result in a configuration where slow tasks that run for more than 60s cause repeated running of tasks, which has caused a few issues. This warning doesn't change the defaults, which would be a marge larger change, but instead provides a, hopefully, helpful message to the user.

* fixed missing bracket

* Update conf.py

fixed spelling

* Update conf.py

Made bool work for python 3.6+

* Fixing typo

Co-authored-by: Ilan Steemers <koed00@gmail.com>
2021-02-26 13:54:56 +01:00
Ilan Steemers
7d03536e89 Migrate to Github Action CI (#507)
* Some small refactors

* Initial test script

* Fixes django matrix

* Trying to set up Disque

* Disque as a docker service

* lowercase action name

* Remove Travis

* Replaces Travis badge with Github actions badge

* Show django version in step

* Typo
2021-02-14 18:59:04 +01:00
Telmo Barros
1d6d996fd0 enhanced admin ormq panel fix and schedules with broker_name 2021-02-06 18:52:17 +00:00
Telmo Barros
10df8351ff Queued tasks admin list page enhancement 2021-02-06 17:56:03 +00:00
Jonas Winkler
11744bf33c Added german translation 2021-01-15 15:54:47 +01:00
Ilan Steemers
552af9db8c Getting read for 1.3.4 2020-10-26 10:59:13 +01:00
Ilan Steemers
6184a1c662 Merge pull request #478 from fallenhitokiri/sqs-get-queue-before-create
try to get SQS queue before creating it
2020-10-20 14:05:31 +02:00
Ilan Steemers
87390509ef Merge pull request #477 from fallenhitokiri/fix-get-broker-sqs
empty dictionary as configuration value for SQS
2020-10-20 14:04:30 +02:00
Ilan Steemers
d97e7d772f Merge pull request #479 from alx-sdv/bugs/model-str
Model.__unicode__() has no effect in Python 3.X
2020-10-20 14:01:40 +02:00
Ilan Steemers
6886c8612b Merge pull request #483 from Djailla/warning
Fix deprecation warning RemovedInDjango40Warning
2020-10-20 14:00:47 +02:00
Bastien Vallet
3144d0c80a Fix deprecation warning RemovedInDjango40Warning
RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
2020-10-19 12:12:37 +02:00
ihuk
5076367168 More work on fix for #424 - TypeError: can't pickle _thread.lock objects.
AWS and Mongo brockers should be pickeled correctly now.
2020-10-16 18:40:26 +02:00
ihuk
8b3d6b7d2a Initial work on fix for #424 - TypeError: can't pickle _thread.lock objects.
Made `Broker` and `Queue` classes pickable which fixes the the problem with new default `spawn` proces start method.
2020-10-14 22:21:40 +02:00
Daniel Trembath
3e8fc91d46 Change Django documentation URLs from v1.8 to v2.2
URLs were linking to a now unsupported version of Django. Django v2.2 is a LTS version, and also matches the documentation intersphinx_mapping in docs/conf.py.
2020-10-07 17:56:23 +11:00
alx-sdv
28197dc4fa Model.__unicode__() has no effect 2020-10-05 12:30:11 +03:00
Timo Zimmermann
9be4da76c1 try to get SQS queue before creating it
In some environments permissions for an IAM role or access key might not include "SQS create".
The broker should first try to get the queue and if this fails try to create it as fall back to the current default behaviour.
2020-09-22 15:58:06 +02:00
Timo Zimmermann
73ca8edcf5 empty dictionary as configuration value for SQS
The [documentation](https://django-q.readthedocs.io/en/latest/configure.html#sqs-configuration) lists all keys as optional, but the way `get_broker` is implemented it will evaluate to false and return Redis. One way around this would be checking if the type of `Conf.SQS` is `dict`.
2020-09-22 15:42:38 +02:00
Ilan Steemers
aba36e2884 Getting ready for 1.3.3 2020-08-16 18:47:55 +02:00
Tim O'Meara
655f0aadb5 rename config var to max_retries, remove attempt_count form admin , add admin ui customization to docs 2020-08-13 11:58:00 -05:00
Tim O'Meara
991cca5844 Revert "version bump"
This reverts commit 3b2f444738.
2020-08-11 17:32:48 -05:00
Tim O'Meara
3b2f444738 version bump 2020-08-11 17:32:08 -05:00
Tim O'Meara
f26de929d6 adds tests 2020-08-11 11:48:23 -05:00
Tim O'Meara
d5a0363af3 add attempt_count to admin 2020-08-11 10:48:46 -05:00
Tim O'Meara
45b0b2cc27 add attempt_count to config docs, set value to 1 in inital task save 2020-08-11 10:42:28 -05:00
Tim O'Meara
3c3395f24b add attempt_count to task 2020-08-11 10:16:31 -05:00
Ilan Steemers
e384e0dfb8 Getting ready for 1.3.2 2020-07-08 23:02:08 +02:00