diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py index bf2c51ecd8..0633632e40 100644 --- a/awx/main/models/unified_jobs.py +++ b/awx/main/models/unified_jobs.py @@ -593,7 +593,9 @@ class UnifiedJob( priority = models.PositiveIntegerField( default=0, editable=False, - help_text=_("Relative priority to other jobs. The higher the number, the higher the priority. Jobs with equivalent prioirty are started based on available capacity and launch time."), + help_text=_( + "Relative priority to other jobs. The higher the number, the higher the priority. Jobs with equivalent prioirty are started based on available capacity and launch time." + ), ) emitted_events = models.PositiveIntegerField( default=0, diff --git a/awx/main/scheduler/task_manager.py b/awx/main/scheduler/task_manager.py index 3988248dd9..4f86d7e060 100644 --- a/awx/main/scheduler/task_manager.py +++ b/awx/main/scheduler/task_manager.py @@ -97,7 +97,7 @@ class TaskBase: UnifiedJob.objects.filter(**filter_args) .exclude(launch_type='sync') .exclude(polymorphic_ctype_id=wf_approval_ctype_id) - .order_by('-priority','created') + .order_by('-priority', 'created') .prefetch_related('dependent_jobs') ) self.all_tasks = [t for t in qs]