Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring: ipfs #10

Merged
merged 5 commits into from
Jan 11, 2022
Merged

Refactoring: ipfs #10

merged 5 commits into from
Jan 11, 2022

Conversation

aopoltorzhicky
Copy link
Member

No description provided.

ticker := time.NewTicker(time.Second * 15)
defer ticker.Stop()

for i := 0; i < 5; i++ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To config?

@@ -79,72 +61,91 @@ func (s *ContractService) manager(ctx context.Context) {
return
}

ticker := time.NewTicker(time.Second * 15)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we parameterize this?

go s.worker(ctx, unresolved)

case <-ticker.C:
if len(s.tasks) > 100 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constant?

contracts = append(contracts, contract)

if len(contracts) == bulkSize {
if len(contracts) == 8 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number?

tasks: make(chan *models.TokenMetadata, 1024*128),
result: make(chan *models.TokenMetadata, 15),
workers: make(chan struct{}, 10),
tasks: make(chan *models.TokenMetadata, 512),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constants?

@m-kus m-kus merged commit f9ccff3 into master Jan 11, 2022
@m-kus m-kus deleted the refactoring/ipfs branch January 11, 2022 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants