How to use the lazy.handling.enabled function in lazy

To help you get started, we’ve selected a few lazy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber-archive / hyperbahn / clients / index.js View on Github external
ApplicationClients.prototype.updateLazyHandling = function updateLazyHandling(hasChanged, forceUpdate) {
    var self = this;

    if (!forceUpdate && !hasChanged['lazy.handling.enabled']) {
        return;
    }

    var enabled = self.remoteConfig.get('lazy.handling.enabled', true);
    self.tchannel.setLazyRelaying(enabled);

    self.tchannel.timers.clearTimeout(self.lazyTimeout);

    if (enabled === false) {
        self.tchannel.timers.clearTimeout(self.lazyTimeout);
        self.lazyTimeout = self.tchannel.timers.setTimeout(turnOffLazyHandling, 30000);
    } else {
        self.tchannel.setLazyHandling(enabled);
    }

    function turnOffLazyHandling() {

lazy

Lazy lists for node

MIT
Latest version published 12 years ago

Package Health Score

67 / 100
Full package analysis