mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-06 12:18:11 +08:00
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
This commit is contained in:
+2
-1
@@ -68,6 +68,7 @@ class ScheduleAdmin(admin.ModelAdmin):
|
||||
"func",
|
||||
"schedule_type",
|
||||
"repeats",
|
||||
"cluster",
|
||||
"next_run",
|
||||
"last_run",
|
||||
"success",
|
||||
@@ -77,7 +78,7 @@ class ScheduleAdmin(admin.ModelAdmin):
|
||||
if not croniter:
|
||||
readonly_fields = ("cron",)
|
||||
|
||||
list_filter = ("next_run", "schedule_type")
|
||||
list_filter = ("next_run", "schedule_type", "cluster")
|
||||
search_fields = ("func",)
|
||||
list_display_links = ("id", "name")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user