@@ -3,8 +3,6 @@ package log
33import (
44 "log"
55 "time"
6-
7- q "github.com/koykov/queue"
86)
97
108// MetricsWriter is Log implementation of queue.MetricsWriter.
@@ -41,9 +39,9 @@ func (w MetricsWriter) WorkerWait(idx uint32, delay time.Duration) {
4139 log .Printf ("queue %s: worker %d waits %s\n " , w .name , idx , delay )
4240}
4341
44- func (w MetricsWriter ) WorkerStop (idx uint32 , force bool , status q. WorkerStatus ) {
42+ func (w MetricsWriter ) WorkerStop (idx uint32 , force bool , status string ) {
4543 if force {
46- log .Printf ("queue %s: worker %d caught force stop signal (current status %d )\n " , w .name , idx , status )
44+ log .Printf ("queue %s: worker %d caught force stop signal (current status %s )\n " , w .name , idx , status )
4745 } else {
4846 log .Printf ("queue %s: worker %d caught stop signal\n " , w .name , idx )
4947 }
@@ -61,12 +59,8 @@ func (w MetricsWriter) QueueRetry() {
6159 log .Printf ("queue %s: retry item processing due to fail\n " , w .name )
6260}
6361
64- func (w MetricsWriter ) QueueLeak (dir q.LeakDirection ) {
65- dirs := "rear"
66- if dir == q .LeakDirectionFront {
67- dirs = "front"
68- }
69- log .Printf ("queue %s: queue leak from %s\n " , w .name , dirs )
62+ func (w MetricsWriter ) QueueLeak (direction string ) {
63+ log .Printf ("queue %s: queue leak from %s\n " , w .name , direction )
7064}
7165
7266func (w MetricsWriter ) QueueDeadline () {
@@ -77,14 +71,14 @@ func (w MetricsWriter) QueueLost() {
7771 log .Printf ("queue %s: queue lost\n " , w .name )
7872}
7973
80- func (w MetricsWriter ) SubQueuePut (subq string ) {
74+ func (w MetricsWriter ) SubqPut (subq string ) {
8175 log .Printf ("queue %s/%s: new item come to the queue\n " , w .name , subq )
8276}
8377
84- func (w MetricsWriter ) SubQueuePull (subq string ) {
78+ func (w MetricsWriter ) SubqPull (subq string ) {
8579 log .Printf ("queue %s/%s: item leave the queue\n " , w .name , subq )
8680}
8781
88- func (w MetricsWriter ) SubQueueDrop (subq string ) {
89- log .Printf ("queue %s/%s: queue drop item\n " , w .name , subq )
82+ func (w MetricsWriter ) SubqLeak (subq string ) {
83+ log .Printf ("queue %s/%s: queue leak item\n " , w .name , subq )
9084}
0 commit comments