From 0cf6661ced71ef00737e3b5caa0140d2816c48c6 Mon Sep 17 00:00:00 2001 From: carmichaelong Date: Thu, 5 Jun 2025 14:52:35 -0700 Subject: [PATCH 1/2] let dev deploy from other branches via github. limit main redeployment only from main --- .github/workflows/ecr-dev.yml | 1 + .github/workflows/ecr.yml | 2 ++ 2 files changed, 3 insertions(+) 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 From 7187641e40b38980491e6125b92ad8525a84e82a Mon Sep 17 00:00:00 2001 From: carmichaelong Date: Thu, 5 Jun 2025 21:25:21 -0700 Subject: [PATCH 2/2] add back priority group in dequeue --- mcserver/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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