Toolforge Check Lag #242
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Toolforge Check Lag | |
| on: | |
| schedule: | |
| - cron: "42 15 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| check_lag: | |
| name: Check Lag | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| tool: ["editgroups", "editgroups-commons"] | |
| steps: | |
| - name: Configure SSH key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
| - name: Run deployment commands | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ vars.SSH_HOST }} | |
| username: ${{ secrets.SSH_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| port: ${{ vars.SSH_PORT }} | |
| request_pty: true | |
| script: | | |
| set -x | |
| become ${{ matrix.tool }} webservice --mem 512Mi python3.11 shell -- webservice-python-bootstrap | |
| become ${{ matrix.tool }} webservice --mem 512Mi python3.11 shell -- ./www/python/venv/bin/python ./www/python/src/manage.py check_lag | |
| if (( $? != 0 )); then | |
| become ${{ matrix.tool }} webservice python3.11 stop | |
| become ${{ matrix.tool }} webservice python3.11 start --cpu 1 --mem 3Gi | |
| fi |