| | |
| | | this.items = new Map(); |
| | | this.subscribers = new Set(); |
| | | this.loadFromStorage = false; |
| | | this.failedFetches = 0; |
| | | |
| | | this.api = jvbSettings.api; |
| | | this.endpoint = 'queue'; |
| | |
| | | if (result.id && operation.id !== result.id) { |
| | | operation = await this.handleServerMerge(operation, result); |
| | | } else { |
| | | operation.status = result.status??'failed'; |
| | | operation.status = result.status??'pending'; |
| | | operation.serverData = result; |
| | | this.updateOperationStatus(operation.id, operation.status); |
| | | } |
| | |
| | | return; |
| | | } |
| | | } catch (error) { |
| | | this.stopPolling(); |
| | | this.updatePanel('synced'); |
| | | console.error('Polling error:', error); |
| | | } |
| | | |