Skip to content

Commit c464e75

Browse files
committed
create ResourceAttributes for default cluster
1 parent 30010b5 commit c464e75

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Containerfile.debugpy

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ RUN apt-get update \
88
WORKDIR /usr/src/app
99
COPY ../../. .
1010

11-
ENV PLUGIN_SLURM=True
12-
ENV PLUGIN_XDMOD=True
13-
ENV EMAIL_DEVELOPMENT_EMAIL_LIST=""
1411

1512
RUN uv sync --extra prod --extra dev
1613
RUN echo "yes" | uv run manage.py initial_setup
17-
RUN uv run coldfront slurm_attr_create
1814
RUN uv run manage.py load_test_data
1915

16+
17+
ENV PLUGIN_SLURM=True
18+
ENV PLUGIN_XDMOD=True
19+
20+
RUN uv run coldfront slurm_attr_create
21+
22+
2023
ENV DEBUG=True
2124
ENV PYTHONUNBUFFERED=1
2225
EXPOSE 8000

coldfront/plugins/slurm/management/commands/slurm_attr_create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def handle(self, *args, **options):
3737
)
3838
return
3939

40-
_, created = ResourceAttribute.get_or_create(
40+
_, created = ResourceAttribute.objects.get_or_create(
4141
resource_attribute_type=ResourceAttributeType.objects.filter(
42-
SLURM_CLUSTER_ATTRIBUTE_NAME
42+
name=SLURM_CLUSTER_ATTRIBUTE_NAME
4343
)[0],
4444
resource=cluster,
4545
value=GENERAL_RESOURCE_NAME,

0 commit comments

Comments
 (0)