Skip to content

Commit

Permalink
update logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nautsimon committed Oct 9, 2023
1 parent d7ff854 commit 4cd1efd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions services/scribe/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ type Config struct {
Chains ChainConfigs `yaml:"chains"`
// RPCURL is the url of the omnirpc.
RPCURL string `yaml:"rpc_url"`
// Verbose is used to enable verbose logging.
Verbose bool `yaml:"verbose"`
}

// IsValid makes sure the config is valid. This is done by calling IsValid() on each
Expand Down
4 changes: 2 additions & 2 deletions services/scribe/service/scribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ func (s Scribe) Start(ctx context.Context) error {
cancelChain() // redundant, but clean.
return fmt.Errorf("global scribe context cancel %w", groupCtx.Err())
case <-chainCtx.Done(): // Chain level context cancel, retry and recreate context.
logger.ReportScribeError(fmt.Errorf("chain level scribe context cancel"), chainID, logger.ContextCancelled)
logger.ReportScribeError(fmt.Errorf("chain level scribe context cancel, %w", chainCtx.Err()), chainID, logger.ContextCancelled)

Check warning on line 85 in services/scribe/service/scribe.go

View check run for this annotation

Codecov / codecov/patch

services/scribe/service/scribe.go#L85

Added line #L85 was not covered by tests
chainCtx, cancelChain = context.WithCancel(ctx)
retryRate = b.Duration()
continue
case <-time.After(retryRate):
err := s.chainIndexers[chainID].Index(groupCtx)
if err != nil {
logger.ReportScribeError(fmt.Errorf("error running chain indexer"), chainID, logger.FatalScribeError)
logger.ReportScribeError(fmt.Errorf("error running chain indexer %w", err), chainID, logger.FatalScribeError)

Check warning on line 92 in services/scribe/service/scribe.go

View check run for this annotation

Codecov / codecov/patch

services/scribe/service/scribe.go#L92

Added line #L92 was not covered by tests
retryRate = b.Duration()
continue
}
Expand Down

0 comments on commit 4cd1efd

Please sign in to comment.