// clear redis keys one by one from internal index to prevent clearing non-apicache entries index.all.forEach(function (key) { clearTimeout(timers[key]) delete timers[key] try { redis.del(key) } catch (err) { console.log('[apicache] error in redis.del("' + key + '")') } })
fetchCurrentTransferSummary() { if (this.pollTimeout != null) { clearTimeout(this.pollTimeout); } this.services.clientGatewayService .fetchTransferSummary(transferSummaryMethodCallConfig) .then(this.handleFetchTransferSummarySuccess.bind(this)) .catch(this.handleFetchTransferSummaryError.bind(this)); }
function close() { clearTimeout(connect_timer) error(errors.connection('CONNECTION_CLOSED', options)) statements = {} messages = [] open = ready = false onclose && onclose() }
setTimeout(function() { if ( config.semaphore > 0 ) { return; } if ( config.timeout ) { clearTimeout( config.timeout ); } config.blocking = false; process( true ); }, 13);
/** * Recreate the INFO key update timer. */ recreateInfoUpdateTimer() { if (this.infoUpdateTimer) clearTimeout(this.infoUpdateTimer); this.infoUpdateTimer = setTimeout(() => { // Reset the INFO packet expiry. this.client.expire(this.INFO_KEY, 60 * 60); // 60 mins this.recreateInfoUpdateTimer(); }, 20 * 60 * 1000 ); // 20 mins this.infoUpdateTimer.unref(); }
// emits file change events but with a delay so that files are 'settled' _emitFileChange(event, filePath) { this.pendingFilesChanged.push(filePath); if (this.watchDeferTimeoutID) { clearTimeout(this.watchDeferTimeoutID); } this.watchDeferTimeoutID = setTimeout(async () => { var filesArr = this.pendingFilesChanged.slice(0); this.pendingFilesChanged = []; this.emit("change", filesArr); }, 1000); }
del(key) { var record = this.cache[key]; if (record == null) { return; } if (record.timeout) { clearTimeout(record.timeout); } delete this.cache[key]; }
const update = () => { // clear queue clearTimeout(timer) queued = false // get latest replication state (merge together values) const resolvedValues = resolveValues(values, ssb.id) // push changes since last update stream.push(objectDiff(lastResolvedValues, resolvedValues)) // update internal de-dupe list lastResolvedValues = resolvedValues }
componentWillUnmount() { if (this.timeoutId) { clearTimeout(this.timeoutId) } }
/** * @public */ destroy() { clearInterval(this.requestTimeoutIntervalId) clearTimeout(this.throttleCheckTimeoutId) this.throttleCheckTimeoutId = null }
function pauseAutoSlide() { if( autoSlide && !autoSlidePaused ) { autoSlidePaused = true; dispatchEvent( 'autoslidepaused' ); clearTimeout( autoSlideTimeout ); if( autoSlidePlayer ) { autoSlidePlayer.setPlaying( false ); } } }
$(window).on('resize', function() { timeout && clearTimeout(timeout); timeout = null; timeout = setTimeout(resize, 30); });
/** * Stop discoverer clients. */ stop() { if (this.infoUpdateTimer) clearTimeout(this.infoUpdateTimer); return super.stop() .then(() => { if (this.client) return this.client.quit(); }); }
componentWillUnmount() { if (this.timeoutId) { clearTimeout(this.timeoutId) } }
del(key) { var record = this.cache[key]; if (record == null) { return; } if (record.timeout) { clearTimeout(record.timeout); } delete this.cache[key]; }