示例#1
0
文件: main.go 项目: ericfode/l2met
func fetch(t time.Time, inbox chan<- *store.Bucket) {
	fmt.Printf("at=start_fetch minute=%d\n", t.Minute())
	mailbox := fmt.Sprintf("librato_outlet.%d", partitionId)
	for bucket := range store.ScanBuckets(mailbox) {
		inbox <- bucket
	}
}
示例#2
0
文件: main.go 项目: ericfode/l2met
func fetch(t time.Time, outbox chan<- *store.Bucket) {
	fmt.Printf("at=start_fetch minute=%d\n", t.Minute())
	defer utils.MeasureT("postgres_outlet.fetch", time.Now())

	mailbox := fmt.Sprintf("postgres_outlet.%d", partitionId)
	for bucket := range store.ScanBuckets(mailbox) {
		outbox <- bucket
	}
}
示例#3
0
文件: main.go 项目: Epictetus/l2met
func fetch(t time.Time, inbox chan<- *store.Bucket) {
	pid, err := utils.LockPartition("librato_outlet", numPartitions, lockTTL)
	if err != nil {
		log.Fatal("Unable to lock partition.")
	}
	fmt.Printf("at=start_fetch minute=%d\n", t.Minute())
	mailbox := fmt.Sprintf("librato_outlet.%d", pid)
	for bucket := range store.ScanBuckets(mailbox) {
		inbox <- bucket
	}
}
示例#4
0
文件: main.go 项目: Epictetus/l2met
func fetch(t time.Time, outbox chan<- *store.Bucket) {
	fmt.Printf("at=start_fetch minute=%d\n", t.Minute())
	defer utils.MeasureT("postgres_outlet.fetch", time.Now())

	pid, err := utils.LockPartition("postgres_outlet", numPartitions, lockTTL)
	if err != nil {
		log.Fatal("Unable to lock partition.")
	}

	mailbox := fmt.Sprintf("postgres_outlet.%d", pid)
	for bucket := range store.ScanBuckets(mailbox) {
		outbox <- bucket
	}
}