From 8eb52901e6d33d4ff1f52905096063fa9ffb853c Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:24:23 +0100 Subject: [PATCH] Update __main__.py (#82) * Update __main__.py Signed-off-by: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> * fix --------- Signed-off-by: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> --- .github/workflows/pulumi-preview.yml | 4 +++- .github/workflows/pulumi-up.yml | 4 +++- pulumi/__main__.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pulumi-preview.yml b/.github/workflows/pulumi-preview.yml index 20dae14..8066b50 100644 --- a/.github/workflows/pulumi-preview.yml +++ b/.github/workflows/pulumi-preview.yml @@ -56,7 +56,9 @@ jobs: uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: - path: ${{ env.POETRY_PATH }}/.venv + path: | + ${{ env.POETRY_PATH }}/.venv + ${{ env.POETRY_PATH }}/.mypy_cache key: python-3.12-poetry-${{ hashFiles('**/poetry.lock') }} restore-keys: | python-3.12-poetry diff --git a/.github/workflows/pulumi-up.yml b/.github/workflows/pulumi-up.yml index 9c444d8..cfa21f9 100644 --- a/.github/workflows/pulumi-up.yml +++ b/.github/workflows/pulumi-up.yml @@ -48,7 +48,9 @@ jobs: uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: - path: ${{ env.POETRY_PATH }}/.venv + path: | + ${{ env.POETRY_PATH }}/.venv + ${{ env.POETRY_PATH }}/.mypy_cache key: python-3.12-poetry-${{ hashFiles('**/poetry.lock') }} restore-keys: | python-3.12-poetry diff --git a/pulumi/__main__.py b/pulumi/__main__.py index a203563..ca70fd2 100644 --- a/pulumi/__main__.py +++ b/pulumi/__main__.py @@ -18,7 +18,7 @@ SYNC_MINUTES_RATE_NORMAL = 24 * 60 # Once a day SYNC_MINUTES_RATE_MEDIUM = 2 * 60 # Every two hours SYNC_MINUTES_RATE_EMERGENCY = 20 -EMERGENCY = True +EMERGENCY = False CUSTOM_DOMAIN_NAME = "erfiume.thedodo.xyz" stazioni_table = dynamodb.Table( @@ -181,7 +181,7 @@ mode="FLEXIBLE", maximum_window_in_minutes=5, ), - schedule_expression=f"rate({SYNC_MINUTES_RATE_EMERGENCY if EMERGENCY else SYNC_MINUTES_RATE_NORMAL} minutes)", + schedule_expression=f"rate({SYNC_MINUTES_RATE_EMERGENCY if EMERGENCY else SYNC_MINUTES_RATE_MEDIUM} minutes)", schedule_expression_timezone="Europe/Rome", target=scheduler.ScheduleTargetArgs( arn=fetcher_lambda.arn,