diff --git a/.github/workflows/ecr-dev.yml b/.github/workflows/ecr-dev.yml index 3bad708..08824d3 100644 --- a/.github/workflows/ecr-dev.yml +++ b/.github/workflows/ecr-dev.yml @@ -28,6 +28,7 @@ on: push: branches: - dev + workflow_dispatch: name: DEV ECS build & deployment diff --git a/.github/workflows/ecr.yml b/.github/workflows/ecr.yml index a494487..92fcf94 100644 --- a/.github/workflows/ecr.yml +++ b/.github/workflows/ecr.yml @@ -29,6 +29,8 @@ on: branches: - main workflow_dispatch: + branches: + - main name: PRODUCTION ECS build & deployment diff --git a/mcserver/views.py b/mcserver/views.py index 7384a89..6bf8caa 100644 --- a/mcserver/views.py +++ b/mcserver/views.py @@ -1500,8 +1500,11 @@ def dequeue(self, request): if trials.count() == 0 and trialsReprocess.count() == 0: raise Http404 - # prioritize admin and priority group trials (priority group doesn't exist yet, but should have same priv. as user) - trialsPrioritized = trials.filter(session__user__groups__name__in=["admin","priority"]) + # prioritize admin group trials first + trialsPrioritized = trials.filter(session__user__groups__name__in=["admin"]) + # if no admin trials, go to priority group trials + if trialsPrioritized.count() == 0: + trialsPrioritized = trials.filter(session__user__groups__name__in=["priority"]) # if not priority trials, go to normal trials if trialsPrioritized.count() == 0: trialsPrioritized = trials