Skip to content

Scheduler

Scheduler #4224

Workflow file for this run

name: Scheduler
on:
workflow_dispatch:
jobs:
schedule:
runs-on: ubuntu-latest
container:
image: archlinux
env:
CACTUS_CONFIG: ${{ secrets.CACTUS_CONFIG }}
steps:
- uses: arch4edu/cactus/actions/upgrade-archlinux@main
- name: Install runtime dependencies
run: pacman -S --noconfirm --needed git python-mysqlclient
- uses: arch4edu/cactus/actions/setup-cactus@main
- uses: arch4edu/cactus/actions/checkout-repository@main
- name: Scheduling
id: schedule
run: |
for i in $(seq 55)
do
(cd repository; git pull --rebase)
python -m cactus.scheduler.schedule repository
sleep 300
done
echo "result=success" >> $GITHUB_OUTPUT
- name: Start a new scheduler
if: ${{ always() }}
run: |
[ -z "${{ steps.schedule.outputs.result }}" ] && sleep 900
python -m cactus.scheduler.refresh