Commit Graph

68 Commits

Author SHA1 Message Date
sinowood
52c04217e9 Multiple queue, multiple cluster in one site (#71)
* Support for multi-queue, multi-cluster configuration. API changes include:
  * Adding `cluster` to async_task() parameters and Task model
  * Adding argument --name to qcluster command
  * Necessary adjustments to Conf and Broker classes
  * Some admin improvements

* Add settings.Q_CLUSTER['ALT_CLUSTERS']: q_cluster config overrides for alternative clusters;
Add Conf.CLUSTER_NAME: separate usage from Conf.PREFIX;
QueueAdmin/OrmQ detail page enhanced: now displaying args/kwargs/q_options instead of encrypted payload.

* if `cluster` argument is not set (the default), async_task() and schedule() will be handled by the default cluster; Documentation update.

* Text cleanup

* Documentation update.

* Fix TIMEOUT setting in Windows for non-default cluster

---------

Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
2023-04-02 16:36:17 +02:00
msabatier
a013591de5 Add intended_date_kwarg field to Schedule (#62)
Co-authored-by: Marc Sabatier <marc.sabatier@eco-adapt.com>
2023-01-17 22:52:11 +01:00
Stan Triepels
b66dfbd3af Fix DST timezone change (move from DST to normal jump) (#56) 2022-12-22 03:02:53 +01:00
Stan Triepels
4d454e4001 Fix: Daylight saving time issue with scheduler (#47) 2022-12-21 01:44:34 +01:00
Stan Triepels
3c0c32758d Chore: Flake8, isort and Black (#40) 2022-11-16 01:45:40 +01:00
Stan Triepels
542e04db54 Feat: Add biweekly and bimonthly and fix translations (#36) 2022-11-13 01:00:11 +01:00
Stan Triepels
6f19b3d270 Fix: func reference in admin (#28) 2022-11-05 02:45:44 +01: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
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
alx-sdv
28197dc4fa Model.__unicode__() has no effect 2020-10-05 12:30:11 +03:00
Tim O'Meara
3c3395f24b add attempt_count to task 2020-08-11 10:16:31 -05:00
Ilan Steemers
c94f2cb816 Adds psutil support for max_rss on other platforms 2020-07-05 18:18:43 +02:00
Ilan Steemers
f223cfcb30 Removing value check 2020-07-01 14:25:51 +02:00
Ilan Steemers
f0061dccd6 Moves optional import to root 2020-06-29 19:08:33 +02:00
Ilan Steemers
ace3d01da7 Optional Cron expression scheduling - inital commit 2020-06-28 15:26:53 +02:00
Ilan
0bca3cbd7a Replacing format with f-strings 2020-02-17 16:59:12 +01:00
Jake Bell
dc65f5e1de Replacing ugettext_ functions with gettext_ for Django 3 2020-01-07 15:57:37 -06:00
Ilan Steemers
4076795dc3 truncate error description in admin
Also removes old conditional imports
2018-08-13 18:50:35 +02:00
Eagllus
904daeeddc Fix urls being escaped by admin 2018-01-29 08:45:02 +01:00
Adam Chidlow
bebe1ba64f Django 2.0 compatibility
- django.core.urlresolvers -> django.urls
- fix major/minor version detection
2017-11-01 18:23:14 +08:00
Gaël Chardon
3d2099f48c Use 32 bits integer for repeat field instead of small integer (16 bits) to avoid overflow with frequent scheduled tasks 2017-10-09 11:30:47 +02:00
Ilan Steemers
8f270a5b97 Allows for blank Schedule names in the admin 2016-02-24 11:27:16 +01:00
Ilan Steemers
6dcead7310 Adds task chains 2015-10-17 12:13:29 +02:00
Ilan Steemers
913edcb3da moves hook signal in separate module
By moving signals in their own module, we can now follow Django guidelines and register signals on app.ready.
2015-10-05 13:46:47 +02:00
Ilan Steemers
061775b3bb Adds group commands to task instances
* adds task.group_result()
* adds task.group_count()
* adds task.group_delete()
2015-09-16 15:47:39 +02:00
Ilan Steemers
5450e59119 Adds name, function and task id to orm queue admin 2015-09-15 16:49:22 +02:00
Ilan Steemers
2bffcf554b Django ORM broker 2015-09-14 13:24:43 +02:00
Ilan Steemers
2078080945 determines decode with django version 2015-09-07 20:38:13 +02:00
Ilan Steemers
e899b93c3f determines decode with django version 2015-09-07 20:35:51 +02:00
Ilan Steemers
f4f8af1382 Fixes backward compatibility problems with django-picklefield 2015-09-07 20:24:21 +02:00
Ilan
de5d0f2725 Adds a 'minutes' option to the scheduler 2015-08-05 20:30:29 +02:00
Ilan
ed019634d2 Sets pickle protocol to highest
* package signing protocol is now set to highest. Tests show this to be about a 35% speed increase and there is increased probability of correctly pickling complex objects.

* also upped the protocol on the result database picklefield.
2015-08-01 11:41:45 +02:00
Ilan
d7ecaee18d Added tests for failures filtering
fixed a bug
2015-07-19 15:21:06 +02:00
Ilan
52e72fde1c Adds failed tasks filtering to groups 2015-07-19 15:15:57 +02:00
Ilan
72f913ab97 switching hook to post_save
This might delay a hook slightly, but it makes more sense if you want to perform hook actions on groups since Pre_save the latest member of the group won't be available yet.
2015-07-19 14:29:40 +02:00
Ilan
e75fbecda8 fixed typo and added group tests 2015-07-19 13:56:16 +02:00
Ilan
ff102630f7 adds count_group() and delete_group() 2015-07-19 13:19:46 +02:00
Ilan
9f9c94c983 decoding values_list on a picklefield turns out to be 10 times faster than using list_comprehension 2015-07-19 12:26:10 +02:00
Ilan
f65c05624d Schedule name and task group should have same max length 2015-07-18 22:32:32 +02:00
Ilan
05d6ecb7a2 renamed get_group_result to get_result_group
I think I fumbled a commit
2015-07-18 18:55:47 +02:00
Ilan
c127604f10 Adds task groups
* task now takes an optional keyword `group`
* added result_group()  and fetch_group()
* added group column to Success admin
* group column in searchable
* added `name` field to Schedules
* Scheduled tasks take schedule name as group
2015-07-18 17:20:50 +02:00
Ilan Steemers
fd168b3202 Added stopped column in admin and sorting models on stopped field. 2015-07-10 12:05:00 +02:00
Ilan Steemers
5b3c8440ca Schedule admin should show name instead of id in task link 2015-07-09 09:12:26 +02:00
Ilan Steemers
d2515d99e0 fixed regression of task link in schedule admin 2015-07-08 22:41:29 +02:00
Ilan Steemers
44c8edb0a2 Keep task length on schedule for backward compatibility
Migrations on existing data would fail because of the old names being longer than the uuid. Keeping the field length at 100 will keep it compatible with existing  data.

Removed the squashed migrations cause this will cause dependency problems on existing installations. Every new migration will list the squashed migrations as a dependency. Not a problem for new installations, but will crash on exisitng ones.
2015-07-08 15:40:38 +02:00
Ilan Steemers
d9d0e7db73 consistent task name formatting 2015-07-08 14:27:51 +02:00
Ilan Steemers
f8708cfd73 Task now uses a UUID4 instead of a LUID 2015-07-08 13:33:03 +02:00
Ilan Steemers
e7d2dd0309 Missed a return on exception 2015-07-05 21:09:05 +02:00
Ilan Steemers
b113a52825 Restructured all the modules
The core module was becoming too large.
By splitting it in  cluster, monitor and tasks it becomes more manageable. It also reflects the documentation structure.
2015-07-03 15:12:11 +02:00
Ilan Steemers
50cc5b821b Removed superfluous return 2015-07-01 12:30:36 +02:00