Browse Source

wait for each publish clients

pull/5637/head
chrislu 12 months ago
parent
commit
a297247137
  1. 6
      weed/mq/client/pub_client/publisher.go

6
weed/mq/client/pub_client/publisher.go

@ -10,7 +10,6 @@ import (
"google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/credentials/insecure"
"log" "log"
"sync" "sync"
"time"
) )
type PublisherConfiguration struct { type PublisherConfiguration struct {
@ -63,7 +62,10 @@ func (p *TopicPublisher) Shutdown() error {
inputBuffer.CloseInput() inputBuffer.CloseInput()
} }
} }
time.Sleep(1100 * time.Millisecond)
for _, job := range p.jobs {
job.wg.Wait()
}
return nil return nil
} }
Loading…
Cancel
Save