MCPcopy Create free account
hub / github.com/experdot/pointer / getOrCreateQueue

Function getOrCreateQueue

src/renderer/src/stores/persistenceQueue.ts:217–228  ·  view source on GitHub ↗
(
  queueId: string,
  factory: () => PersistenceQueue<string, TData>
)

Source from the content-addressed store, hash-verified

215}
216
217function getOrCreateQueue<TData>(
218 queueId: string,
219 factory: () => PersistenceQueue<string, TData>
220): PersistenceQueue<string, TData> {
221 registerFlushListener()
222
223 if (!queues.has(queueId)) {
224 queues.set(queueId, factory() as PersistenceQueue<string, unknown>)
225 }
226
227 return queues.get(queueId)! as PersistenceQueue<string, TData>
228}
229
230function accountQueueId(accountId: string, entity: string): string {
231 return `account:${accountId}:${entity}`

Callers 6

getSettingsQueueFunction · 0.85
getLayoutQueueFunction · 0.85
getTabsQueueFunction · 0.85
getFoldersQueueFunction · 0.85
getPageFileQueueFunction · 0.85

Calls 3

registerFlushListenerFunction · 0.85
hasMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected