Skip to content

Check Redash Scheduler #16801

Check Redash Scheduler

Check Redash Scheduler #16801

name: Check Redash Scheduler
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
permissions:
contents: read
id-token: write
pull-requests: write
actions: write
jobs:
test_schedule:
runs-on: ubuntu-latest
env:
REDASH_API_KEY: ${{ secrets.REDASH_API_KEY }}
AWS_REGION: us-east-2
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: Check last Scheduler Run
id: check_last_run
run: python3 ./cron/checkScheduler.py
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::906503920888:role/github-actions-oidc-redash
aws-region: ${{ env.AWS_REGION }}
- name: Restart Schedule Service if Scheduler is not Updating
if: failure() && steps.check_last_run.outcome == 'failure'
run: |
aws ecs update-service --cluster "Redash-EcsDefaultClusterMnL3mNNYNCFVPC50666647-nafwh7AtuVL1" --service "scheduler" --force-new-deployment
- name: Verify Task Deployment
id: verify-deployment
run: |
if aws ecs wait services-stable --cluster "Redash-EcsDefaultClusterMnL3mNNYNCFVPC50666647-nafwh7AtuVL1" --services "scheduler" --output json; then
echo "Success: Service is stable."
else
echo "Error: The AWS Task Deployment failed, please check logs at https://observability.masterworks.com/"
exit 1
fi