Skip to content

Commit

Permalink
Fix: bulk update
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed May 1, 2022
1 parent 140fbbd commit 7b0e945
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/metadata/service/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (s *TokenService) saver(ctx context.Context) {
case token := <-s.result:
tokens = append(tokens, token)

if len(tokens) < 10 {
if len(tokens) < 2 {
continue
}

Expand Down
13 changes: 7 additions & 6 deletions cmd/metadata/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,16 @@ func (indexer *Indexer) resolveTokenMetadata(ctx context.Context, tm *models.Tok
resolved.Data = helpers.Escape(resolved.Data)
if utf8.Valid(resolved.Data) {
tm.Status = models.StatusApplied

metadata, err := mergeTokenMetadata(tm.Metadata, resolved.Data)
if err != nil {
return err
}
tm.Metadata = metadata

} else {
tm.Status = models.StatusFailed
}

metadata, err := mergeTokenMetadata(tm.Metadata, resolved.Data)
if err != nil {
return err
}
tm.Metadata = metadata
}

if resolved.By == resolver.ResolverTypeIPFS && tm.Status == models.StatusApplied {
Expand Down

0 comments on commit 7b0e945

Please sign in to comment.