Define an empty Shutdown function on base daemon
This commit is contained in:
parent
7af5b18d85
commit
79cb745a5d
|
@ -164,6 +164,8 @@ func (d *BaseDaemon) Logf(format string, v ...interface{}) {
|
|||
d.logger.Printf(format, v...)
|
||||
}
|
||||
|
||||
func (d *BaseDaemon) Shutdown() {}
|
||||
|
||||
// String returns the name of the Deamon unerlying struct.
|
||||
func (d *BaseDaemon) String() string {
|
||||
if d.name == "" {
|
||||
|
|
|
@ -22,9 +22,6 @@ func (n *NumberPrinter) Startup() {
|
|||
n.SystemProcess("Random Number Generator", n.generateNumbers)
|
||||
}
|
||||
|
||||
// Shutdown is empty due to the lack of cleanup.
|
||||
func (n *NumberPrinter) Shutdown() {}
|
||||
|
||||
func (n *NumberPrinter) generateNumbers() {
|
||||
for n.Continue() {
|
||||
if rand.Intn(10) == 0 {
|
||||
|
|
|
@ -24,6 +24,3 @@ func (p *PriceConsumer) Startup() {
|
|||
})
|
||||
p.LimitRate(5, time.Second)
|
||||
}
|
||||
|
||||
// Shutdown is empty because PriceConsumer requires no cleanup upon exiting.
|
||||
func (p *PriceConsumer) Shutdown() {}
|
||||
|
|
Loading…
Reference in New Issue