mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
Reducing max bandwidth by 10% to prevent potential rate limit issues.
This commit is contained in:
parent
e65fe99316
commit
af80a7bff7
@ -17,6 +17,8 @@ import (
|
||||
"github.com/go-kit/log/level"
|
||||
)
|
||||
|
||||
const calendarConsumers = 18
|
||||
|
||||
func newCalendarSchedule(
|
||||
ctx context.Context,
|
||||
instanceID string,
|
||||
@ -200,11 +202,10 @@ func processCalendarFailingHosts(
|
||||
) {
|
||||
hosts = filterHostsWithSameEmail(hosts)
|
||||
|
||||
const consumers = 20
|
||||
hostsCh := make(chan fleet.HostPolicyMembershipData)
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for i := 0; i < consumers; i++ {
|
||||
for i := 0; i < calendarConsumers; i++ {
|
||||
wg.Add(+1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
@ -500,11 +501,10 @@ func removeCalendarEventsFromPassingHosts(
|
||||
})
|
||||
}
|
||||
|
||||
const consumers = 20
|
||||
emailsCh := make(chan emailWithHosts)
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for i := 0; i < consumers; i++ {
|
||||
for i := 0; i < calendarConsumers; i++ {
|
||||
wg.Add(+1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
@ -669,10 +669,9 @@ func deleteCalendarEventsInParallel(
|
||||
logger kitlog.Logger,
|
||||
) {
|
||||
if len(calendarEvents) > 0 {
|
||||
const consumers = 20
|
||||
calendarEventCh := make(chan *fleet.CalendarEvent)
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < consumers; i++ {
|
||||
for i := 0; i < calendarConsumers; i++ {
|
||||
wg.Add(+1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
Loading…
Reference in New Issue
Block a user