MCPcopy
hub / github.com/ChineseSubFinder/ChineseSubFinder / Send

Method Send

pkg/notify_center/NotifyCenter.go:33–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func (n *NotifyCenter) Send() {
34 if n == nil || n.webhookUrl == "" {
35 return
36 }
37 client := resty.New().SetTransport(&http.Transport{
38 DisableKeepAlives: true,
39 MaxIdleConns: 100,
40 MaxIdleConnsPerHost: 100,
41 })
42 for s, s2 := range n.infos {
43 _, err := client.R().Get(n.webhookUrl + s + "/" + url.QueryEscape(s2))
44 if err != nil {
45 n.log.Errorln("NewNotifyCenter.Send", err)
46 return
47 }
48 }
49}
50
51func (n *NotifyCenter) Clear() {
52 if n == nil {

Callers 2

TestNewNotifyCenterFunction · 0.95
ProcessFunction · 0.80

Calls 1

GetMethod · 0.65

Tested by 1

TestNewNotifyCenterFunction · 0.76