-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
4ab7f09
to
659e65c
Compare
ticker := time.NewTicker(time.Second * 15) | ||
defer ticker.Stop() | ||
|
||
for i := 0; i < 5; i++ { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constants?
No description provided.