Commit 32d25f76 authored by ius's avatar ius
Browse files

fix: respect preconfigured usage log batch channels

parent 18ba8d91
......@@ -377,7 +377,7 @@ func (r *usageLogRepository) createBatched(ctx context.Context, log *service.Usa
}
func (r *usageLogRepository) ensureCreateBatcher() {
if r == nil || r.db == nil {
if r == nil || r.db == nil || r.createBatchCh != nil {
return
}
r.createBatchOnce.Do(func() {
......@@ -387,7 +387,7 @@ func (r *usageLogRepository) ensureCreateBatcher() {
}
func (r *usageLogRepository) ensureBestEffortBatcher() {
if r == nil || r.db == nil {
if r == nil || r.db == nil || r.bestEffortBatchCh != nil {
return
}
r.bestEffortBatchOnce.Do(func() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment