MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Stop

Method Stop

internal/metrics/task_sqlite.go:237–261  ·  view source on GitHub ↗

Stop 停止任务

()

Source from the content-addressed store, hash-verified

235
236// Stop 停止任务
237func (this *SQLiteTask) Stop() error {
238 this.isStopped = true
239
240 if this.cleanTicker != nil {
241 this.cleanTicker.Stop()
242 }
243 if this.uploadTicker != nil {
244 this.uploadTicker.Stop()
245 }
246 if this.statsTicker != nil {
247 this.statsTicker.Stop()
248 }
249
250 _ = this.insertStatStmt.Close()
251 _ = this.deleteByVersionStmt.Close()
252 _ = this.deleteByExpiresTimeStmt.Close()
253 _ = this.selectTopStmt.Close()
254 _ = this.sumStmt.Close()
255
256 if this.db != nil {
257 _ = this.db.Close()
258 }
259
260 return nil
261}
262
263func (this *SQLiteTask) Delete() error {
264 return nil

Callers

nothing calls this directly

Calls 2

StopMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected