From 997d3c16a8228c639c5fa3f60020ac97fcc0f42c Mon Sep 17 00:00:00 2001 From: powe97 <116031952+powe97@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:48:20 -0500 Subject: [PATCH 1/2] =?UTF-8?q?2hr=20timeout=20=E2=86=92=2045m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/transfer.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/transfer.yml b/.github/workflows/transfer.yml index 7fd0250..5917c34 100644 --- a/.github/workflows/transfer.yml +++ b/.github/workflows/transfer.yml @@ -1,5 +1,7 @@ name: Scrape transfer and update file run-name: Scrape transfer and update file +env: + DEFAULT_TIMEOUT: 45 on: # schedule: # - cron: '*/15 * * * *' @@ -11,7 +13,7 @@ on: description: "Timeout time" required: true type: number - default: 120 + default: ${{ env.DEFAULT_TIMEOUT }} concurrency: group: transfer-scraper @@ -52,7 +54,7 @@ jobs: mkdir new-data rsync -avzh data/transfer.json new-data rsync -avzh data/transfer_state.json new-data - python3 quatalog-scraping/transfer_scraper/main.py new-data/transfer.json new-data/transfer_state.json ${{ github.event.inputs.timeout }} + python3 quatalog-scraping/transfer_scraper/main.py new-data/transfer.json new-data/transfer_state.json ${{ github.event.inputs.timeout || env.DEFAULT_TIMEOUT }} - name: Upload data to artifact uses: actions/upload-artifact@v4 From 5fe4ee9f1341f0a846dc51a27034d61d66a1ae43 Mon Sep 17 00:00:00 2001 From: powe97 <116031952+powe97@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:12:23 -0500 Subject: [PATCH 2/2] Change manually run workflow to have timeout of 2 mins --- .github/workflows/transfer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/transfer.yml b/.github/workflows/transfer.yml index 5917c34..6b35242 100644 --- a/.github/workflows/transfer.yml +++ b/.github/workflows/transfer.yml @@ -13,7 +13,7 @@ on: description: "Timeout time" required: true type: number - default: ${{ env.DEFAULT_TIMEOUT }} + default: 2 concurrency: group: transfer-scraper