mirror of https://bitbucket.org/ausocean/av.git
revid: adding debug prints
This commit is contained in:
parent
724042baeb
commit
195f52ae16
|
@ -29,6 +29,7 @@ LICENSE
|
|||
package revid
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
@ -122,6 +123,7 @@ func (s *httpSender) load(c *ring.Chunk) error {
|
|||
|
||||
func (s *httpSender) send() error {
|
||||
if s.chunk == nil {
|
||||
fmt.Println("chunk is nil")
|
||||
// Do not retry with httpSender,
|
||||
// so just return without error
|
||||
// if the chunk has been cleared.
|
||||
|
@ -133,6 +135,7 @@ func (s *httpSender) send() error {
|
|||
pins := netsender.MakePins(ip, "V")
|
||||
for i, pin := range pins {
|
||||
if pin.Name == "V0" {
|
||||
fmt.Println("pin is V0")
|
||||
send = true
|
||||
pins[i].Value = s.chunk.Len()
|
||||
pins[i].Data = s.chunk.Bytes()
|
||||
|
@ -142,6 +145,7 @@ func (s *httpSender) send() error {
|
|||
}
|
||||
var err error
|
||||
if send {
|
||||
fmt.Println("sending")
|
||||
_, _, err = s.client.Send(netsender.RequestPoll, pins)
|
||||
}
|
||||
// We will not retry, so release
|
||||
|
|
Loading…
Reference in New Issue