1、修改bug
This commit is contained in:
parent
2c72ebec4f
commit
be7c3e11c6
4
go.mod
4
go.mod
|
@ -3,8 +3,9 @@ module git.hpds.cc/pavement/hpds_node
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.hpds.cc/Component/network v0.0.0-20230405091029-b109c53056fb
|
git.hpds.cc/Component/network v0.0.0-20230405125523-abb93c020ff5
|
||||||
github.com/disintegration/imaging v1.6.2
|
github.com/disintegration/imaging v1.6.2
|
||||||
|
github.com/quic-go/quic-go v0.33.0
|
||||||
github.com/stretchr/testify v1.8.0
|
github.com/stretchr/testify v1.8.0
|
||||||
github.com/u2takey/ffmpeg-go v0.4.1
|
github.com/u2takey/ffmpeg-go v0.4.1
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
|
@ -24,7 +25,6 @@ require (
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
|
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
|
||||||
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
|
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
|
||||||
github.com/quic-go/quic-go v0.33.0 // indirect
|
|
||||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||||
github.com/u2takey/go-utils v0.3.1 // indirect
|
github.com/u2takey/go-utils v0.3.1 // indirect
|
||||||
go.uber.org/atomic v1.7.0 // indirect
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
|
|
|
@ -21,11 +21,11 @@ func (z *messageQueue) init() {
|
||||||
go func() {
|
go func() {
|
||||||
c := make(chan os.Signal, 1)
|
c := make(chan os.Signal, 1)
|
||||||
signal.Notify(c, syscall.SIGTERM, syscall.SIGUSR2, syscall.SIGUSR1, syscall.SIGINT)
|
signal.Notify(c, syscall.SIGTERM, syscall.SIGUSR2, syscall.SIGUSR1, syscall.SIGINT)
|
||||||
log.Printf("%sListening SIGUSR1, SIGUSR2, SIGTERM/SIGINT...", mqLogPrefix)
|
log.Infof("%sListening SIGUSR1, SIGUSR2, SIGTERM/SIGINT...", mqLogPrefix)
|
||||||
for p1 := range c {
|
for p1 := range c {
|
||||||
log.Printf("Received signal: %s", p1)
|
log.Infof("Received signal: %s", p1)
|
||||||
if p1 == syscall.SIGTERM || p1 == syscall.SIGINT {
|
if p1 == syscall.SIGTERM || p1 == syscall.SIGINT {
|
||||||
log.Printf("graceful shutting down ... %s", p1)
|
log.Infof("graceful shutting down ... %s", p1)
|
||||||
_ = z.Close()
|
_ = z.Close()
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
} else if p1 == syscall.SIGUSR2 {
|
} else if p1 == syscall.SIGUSR2 {
|
||||||
|
@ -33,7 +33,7 @@ func (z *messageQueue) init() {
|
||||||
runtime.ReadMemStats(&m)
|
runtime.ReadMemStats(&m)
|
||||||
fmt.Printf("\tNumGC = %v\n", m.NumGC)
|
fmt.Printf("\tNumGC = %v\n", m.NumGC)
|
||||||
} else if p1 == syscall.SIGUSR1 {
|
} else if p1 == syscall.SIGUSR1 {
|
||||||
log.Printf("print MessageQueue stats(): %d", z.Stats())
|
log.Infof("print MessageQueue stats(): %d", z.Stats())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -13,11 +13,11 @@ func (z *messageQueue) init() {
|
||||||
go func() {
|
go func() {
|
||||||
c := make(chan os.Signal, 1)
|
c := make(chan os.Signal, 1)
|
||||||
signal.Notify(c, syscall.SIGTERM, syscall.SIGINT)
|
signal.Notify(c, syscall.SIGTERM, syscall.SIGINT)
|
||||||
log.Printf("%sListening SIGTERM/SIGINT...", mqLogPrefix)
|
log.Infof("%s Listening SIGTERM/SIGINT...", mqLogPrefix)
|
||||||
for p1 := range c {
|
for p1 := range c {
|
||||||
log.Printf("Received signal: %s", p1)
|
log.Printf("Received signal: %s", p1)
|
||||||
if p1 == syscall.SIGTERM || p1 == syscall.SIGINT {
|
if p1 == syscall.SIGTERM || p1 == syscall.SIGINT {
|
||||||
log.Printf("graceful shutting down ... %s", p1)
|
log.Infof("%s graceful shutting down ... %s", mqLogPrefix, p1)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,9 +61,6 @@ type streamFunction struct {
|
||||||
// Deprecated: use hpds.WithObserveDataTags instead
|
// Deprecated: use hpds.WithObserveDataTags instead
|
||||||
func (s *streamFunction) SetObserveDataTags(tag ...frame.Tag) {
|
func (s *streamFunction) SetObserveDataTags(tag ...frame.Tag) {
|
||||||
s.client.SetObserveDataTags(tag...)
|
s.client.SetObserveDataTags(tag...)
|
||||||
//co := network.WithObserveDataTags(tag...)
|
|
||||||
//s.client.
|
|
||||||
//s.client.SetObserveDataTags(tag...)
|
|
||||||
s.client.Logger().Debugf("%s SetObserveDataTag(%v)", streamFunctionLogPrefix, s.observeDataTags)
|
s.client.Logger().Debugf("%s SetObserveDataTag(%v)", streamFunctionLogPrefix, s.observeDataTags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue