()
| 416 | abstract _sync(): Promise<void>; |
| 417 | |
| 418 | public async sync(): Promise<void> { |
| 419 | this.logger.log('[SINGLE]', 'Sync', this.ids); |
| 420 | this.lastError = null; |
| 421 | this._setTags( |
| 422 | await utils.setEntrySettings(this.type, this.getCacheKey(), this.options, this._getTags()), |
| 423 | ); |
| 424 | this.fixDates(); |
| 425 | return this._sync() |
| 426 | .catch(e => { |
| 427 | this.lastError = e; |
| 428 | throw e; |
| 429 | }) |
| 430 | .then(() => { |
| 431 | this.undoState = this.persistenceState; |
| 432 | if (this.updateProgress) this.initProgress(); |
| 433 | this._onList = true; |
| 434 | this.emitUpdate(); |
| 435 | }); |
| 436 | } |
| 437 | |
| 438 | public emitUpdate(action: 'update' | 'state' = 'update') { |
| 439 | globalEmit(`${action}.${this.getCacheKey()}`, { |
nothing calls this directly
no test coverage detected