From 5ae58439639cd17530b78034197c078c6b32a090 Mon Sep 17 00:00:00 2001 From: Xiao Gui Date: Fri, 23 Aug 2024 13:06:12 +0200 Subject: [PATCH] fix: gha --- .github/workflows/docker-img.yml | 2 +- new_api/common/decorators.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-img.yml b/.github/workflows/docker-img.yml index 42edd03..742024f 100644 --- a/.github/workflows/docker-img.yml +++ b/.github/workflows/docker-img.yml @@ -154,7 +154,7 @@ jobs: include: - yml-file: .helm/adhoc/warm-cache.yaml podname: warmup-pod - - yaml-file: .helm/adhoc/warm-cache-v4.yaml + - yml-file: .helm/adhoc/warm-cache-v4.yaml podname: warmup-pod-v4 steps: - uses: actions/checkout@v4 diff --git a/new_api/common/decorators.py b/new_api/common/decorators.py index 819d8c6..0a0fa30 100644 --- a/new_api/common/decorators.py +++ b/new_api/common/decorators.py @@ -6,7 +6,7 @@ def dummy(*args, **kwargs): pass -ROLE_TYPE = Union[Literal['worker'], Literal["server"], Literal["all"]] +ROLE_TYPE = Literal["worker", "server", "all"] def data_decorator(role: ROLE_TYPE): """data decorator @@ -19,7 +19,7 @@ def data_decorator(role: ROLE_TYPE): Raises: ImportError: Celery not installed, but role is set to either `worker` or `server` """ - if role != "worker": + if role == "all": logger.warning(f"Role was set to be {role}, calls to map/* endpoints will fail. See https://github.com/FZJ-INM1-BDA/siibra-api/issues/151") def outer_wrapper(fn): if role == "all":