MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / flush

Method flush

src/utils/sessionStorage.ts:887–907  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

885 }
886
887 async flush(): Promise<void> {
888 // Cancel pending timer
889 if (this.flushTimer) {
890 clearTimeout(this.flushTimer)
891 this.flushTimer = null
892 }
893 // Wait for any in-flight drain to finish
894 if (this.activeDrain) {
895 await this.activeDrain
896 }
897 // Drain anything remaining in the queues
898 await this.drainWriteQueue()
899
900 // Wait for non-queue tracked operations (e.g. removeMessageByUuid)
901 if (this.pendingWriteCount === 0) {
902 return
903 }
904 return new Promise<void>(resolve => {
905 this.flushResolvers.push(resolve)
906 })
907 }
908
909 /**
910 * Remove a message from the transcript by UUID.

Callers 9

getProjectFunction · 0.45
flushSessionStorageFunction · 0.45
flushAsciicastRecorderFunction · 0.45
flushFunction · 0.45
flushDebugLogsFunction · 0.45
flushFunction · 0.45
flushAndCleanupFunction · 0.45

Calls 1

drainWriteQueueMethod · 0.95

Tested by

no test coverage detected