MCPcopy Index your code
hub / github.com/MALSync/MALSync / sync

Function sync

src/_provider/singleAbstract.ts:418–436  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()}`, {

Callers

nothing calls this directly

Calls 4

_setTagsMethod · 0.45
getCacheKeyMethod · 0.45
_getTagsMethod · 0.45
_syncMethod · 0.45

Tested by

no test coverage detected