Stop 停止任务
()
| 235 | |
| 236 | // Stop 停止任务 |
| 237 | func (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 | |
| 263 | func (this *SQLiteTask) Delete() error { |
| 264 | return nil |