mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
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.
This commit is contained in:
parent
23d1213c9c
commit
4d6648854d
@ -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."))
|
||||
|
Loading…
Reference in New Issue
Block a user