chore: add backoff and retry logic to paperstack wflow #1
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: Paperstack Core | |
| on: | |
| workflow_call: | |
| inputs: | |
| search-arxiv: | |
| description: "Search Arxiv?" | |
| required: true | |
| type: "boolean" | |
| search-scholar: | |
| description: "Search Semantic Scholar?" | |
| required: true | |
| type: "boolean" | |
| push: | |
| branches: | |
| - "ads/eng-1935-paperstack-1-notion-api-timeouts-causing-paperstack" | |
| jobs: | |
| run-script: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 # Adding 2-hour timeout for the entire job | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5.6.0 | |
| with: | |
| python-version: "3.x" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run paperstack | |
| run: | | |
| python paperstack.py ${{ inputs.search-arxiv && '--search-arxiv' || '' }} ${{ inputs.search-scholar && '--search-semantic-scholar' || '' }} | |
| env: | |
| NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
| NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }} | |
| OPENAI_API_TOKEN: ${{ secrets.OPENAI_API_TOKEN }} |