MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / loadPersistedQueue

Method loadPersistedQueue

packages/sdks/react-native/index.ts:100–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 }
99
100 private async loadPersistedQueue() {
101 if (!this.storage) {
102 return;
103 }
104 try {
105 const stored = await this.storage.getItem(QUEUE_STORAGE_KEY);
106 if (stored) {
107 const items = JSON.parse(stored);
108 if (Array.isArray(items) && items.length > 0) {
109 this.queue = [...items, ...this.queue];
110 this.flush();
111 }
112 }
113 } catch {
114 this.log('Failed to load persisted queue');
115 }
116 }
117
118 private persistQueue() {
119 if (!this.storage) {

Callers 1

constructorMethod · 0.95

Calls 4

flushMethod · 0.95
logMethod · 0.95
getItemMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected