From 4d6648854de5cf61ac1939620c6cd37eb844e447 Mon Sep 17 00:00:00 2001 From: dianbofa Date: Thu, 8 May 2025 13:25:51 +0800 Subject: [PATCH] feat(core): Add queue_name parameter to enqueue() function Added the queue_name parameter to the enqueue() function to specify the target queue name for task scheduling. If this parameter is not provided, the system will default to using the predefined model queue. This enhancement provides greater scheduling flexibility, allowing tasks to be assigned to different queues as needed. --- netbox/core/models/jobs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/core/models/jobs.py b/netbox/core/models/jobs.py index 00626b839..39e2e522a 100644 --- a/netbox/core/models/jobs.py +++ b/netbox/core/models/jobs.py @@ -227,6 +227,8 @@ class Job(models.Model): interval: Recurrence interval (in minutes) immediate: Run the job immediately without scheduling it in the background. Should be used for interactive management commands only. + queue_name: Specifies a target queue name for task scheduling. If omitted, + the system defaults to the predefined model queue.(optional) """ if schedule_at and immediate: raise ValueError(_("enqueue() cannot be called with values for both schedule_at and immediate."))