Fix examples
This commit is contained in:
@@ -14,8 +14,8 @@ type NumberPrinter struct {
|
||||
|
||||
// Startup sets up panic handler and starts enqueuing number printing jobs.
|
||||
func (n *NumberPrinter) Startup() {
|
||||
n.HandlePanics(func(err interface{}) {
|
||||
n.Logf("Oh, crap! There was a panic, take a look: %v", err)
|
||||
n.HandlePanics(func(err error) {
|
||||
n.Logf("Oh, crap! There was a panic, take a look: %s", err.Error())
|
||||
})
|
||||
|
||||
n.LimitRate(3, time.Second)
|
||||
|
||||
@@ -3,12 +3,12 @@ package daemons
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/localhots/shezmu"
|
||||
"github.com/localhots/shezmu/consumer"
|
||||
)
|
||||
|
||||
// PriceConsumer consumes price update messages and prints them to the console.
|
||||
type PriceConsumer struct {
|
||||
shezmu.BaseDaemon
|
||||
consumer.Consumer
|
||||
}
|
||||
|
||||
// PriceUpdate describes a price update message.
|
||||
|
||||
Reference in New Issue
Block a user