Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena committed Oct 29, 2024
1 parent 1b4cfb1 commit 8651ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions comptest/web/management/commands/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import aiodocker
import aiodocker.containers
import fsspec
from asgiref.sync import sync_to_async
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db.models import Exists, OuterRef, Q
Expand Down Expand Up @@ -189,7 +188,7 @@ async def ahandle(self):

# Get the number of running evaluations
# This is a synchronous operation so it's wrapped in sync_to_async
num = await sync_to_async(running_evaluations.count)()
num = await running_evaluations.acount()
async for e in unstarted_evaluations:
# Only start a new evaluation if the number of running evaluations is less than the maximum
if num < settings.MAX_RUNNING_EVALUATIONS:
Expand Down
7 changes: 2 additions & 5 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,19 @@ spec:
subPath: comptest.yaml
- name: staticfiles
mountPath: /opt/staticfiles
{{- if .Values.adminUsers }}
- name: admin-add
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/frx-challenges/comptest
command:
{{- if .Values.adminUsers }}
- python
- manage.py
- promote
{{- range .Values.adminUsers }}
- {{ . }}
{{- end }}
{{- else }}
- echo
- "No admin users to add"
{{- end }}
{{- end }}
securityContext:
runAsUser: 0
volumeMounts:
Expand Down

0 comments on commit 8651ad2

Please sign in to comment.