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

Add throttle config base #138

Merged
merged 2 commits into from
Jun 21, 2021
Merged

Add throttle config base #138

merged 2 commits into from
Jun 21, 2021

Conversation

yigarashi-9
Copy link
Contributor

We are going to implement throttled queue. I implement schema and model first.

@yigarashi-9 yigarashi-9 self-assigned this Jun 16, 2021
@@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS `queue_throttle` (
`name` VARCHAR(255) NOT NULL,
`max_dispatches_per_second` FLOAT UNSIGNED NOT NULL,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think float has enough precison for our purpose.

model/model.go Outdated
Name string `json:"name"`
PollingInterval uint `json:"polling_interval"`
MaxWorkers uint `json:"max_workers"`
MaxDispatchesPerSecond float64 `json:"max_dispatches_per_second"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@tarao tarao left a comment

Choose a reason for hiding this comment

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

@yigarashi-9 yigarashi-9 merged commit d09f761 into master Jun 21, 2021
@yigarashi-9 yigarashi-9 deleted the add-throttling-config branch June 21, 2021 03:14
@yigarashi-9 yigarashi-9 mentioned this pull request Jun 28, 2021
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.

None yet

3 participants