| | |
| | | OPERATIONS |
| | | ****************************************************************************/ |
| | | addToQueue(operation) { |
| | | console.log(operation, 'Adding to queue:'); |
| | | const item = { |
| | | id: `u${this.user}_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`, |
| | | endpoint: null, |
| | |
| | | this.ui.refresh.button.classList.add('fetching'); |
| | | this.store.clearCache(); |
| | | let response = await this.store.fetch(); |
| | | if (response.status === 429) { |
| | | |
| | | if (Object.hasOwn(response, 'status') && response.status === 429) { |
| | | console.log('Too many requests. Waiting 30 seconds'); |
| | | this.stopPolling(); |
| | | this.startCountdown(30, () => this.runPollCycle()); |