MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / sendTEvents

Function sendTEvents

pkg/wcloud/wcloud.go:182–202  ·  view source on GitHub ↗
(clientId string)

Source from the content-addressed store, hash-verified

180}
181
182func sendTEvents(clientId string) (int, error) {
183 numIters := 0
184 totalEvents := 0
185 for {
186 numIters++
187 done, numEvents, err := sendTEventsBatch(clientId)
188 if err != nil {
189 log.Printf("error sending telemetry events: %v\n", err)
190 break
191 }
192 totalEvents += numEvents
193 if done {
194 break
195 }
196 if numIters > TEventsMaxBatches {
197 log.Printf("sendTEvents, hit %d iterations, stopping\n", numIters)
198 break
199 }
200 }
201 return totalEvents, nil
202}
203
204func SendAllTelemetry(clientId string) error {
205 ctx, cancelFn := context.WithTimeout(context.Background(), 2*time.Second)

Callers 1

SendAllTelemetryFunction · 0.85

Calls 1

sendTEventsBatchFunction · 0.85

Tested by

no test coverage detected