Skip to content

Open-source status page, incident response and uptime monitoring

281 B
Raw Blame
package tinybird

// PendingRows reports the rows buffered for a data source and not yet detached.
func (b *Batcher) PendingRows(dataSource string) int {
	b.mu.Lock()
	defer b.mu.Unlock()
	if pending, ok := b.batches[dataSource]; ok {
		return len(pending.waiters)
	}

	return 0
}