Skip to content

Commit

Permalink
increase default scribe timeout (#2926)
Browse files Browse the repository at this point in the history
* increase default scribe timeout

* make goreleaser faster

Co-authored-by: Trajan0x <[email protected]>
  • Loading branch information
trajan0x and trajan0x authored Jul 28, 2024
1 parent 60d78e9 commit b061c0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/goreleaser-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ jobs:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
fetch-depth: ${{ github.ref == 'refs/heads/master' && '0' || '1' }}

- name: Set up cache
if: ${{ !contains(runner.name, 'nsc') }}
Expand Down Expand Up @@ -179,10 +178,12 @@ jobs:

-
name: Fetch all tags
if: steps.branch-name.outputs.is_default == 'true'
run: git fetch --force --tags

# get the tag we just created
- name: Git Fetch Unshallow
if: steps.branch-name.outputs.is_default == 'true'
run: git fetch

- name: Import GPG key
Expand Down
15 changes: 12 additions & 3 deletions services/scribe/service/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/synapsecns/sanguine/services/scribe/service/indexer"
scribeTypes "github.com/synapsecns/sanguine/services/scribe/types"
"math/big"
"os"

"math"
"time"
Expand Down Expand Up @@ -398,8 +399,8 @@ func (c *ChainIndexer) livefillAtHead(parentContext context.Context) error {
continue
}

// Default refresh rate for livefill to tip is 1 second.
timeout = 1 * time.Second
// Default refresh rate for livefill to tip is 3 second.
timeout = defaultTimeout
}
}
}
Expand Down Expand Up @@ -470,7 +471,15 @@ func (c *ChainIndexer) livefill(parentContext context.Context) error {

// Default refresh rate for livefill is 1 second.
// TODO add to config
timeout = 1 * time.Second
timeout = defaultTimeout
}
}
}

var defaultTimeout = 3 * time.Second

func init() {
if os.Getenv("CI") != "" {
defaultTimeout = 1 * time.Second
}
}

0 comments on commit b061c0d

Please sign in to comment.