Giter Site home page Giter Site logo

es6-promise-pool's Introduction

ES6 Promise Pool

npm Bower CircleCI Build AppVeyor Build Coverage Status JavaScript Standard Style

Runs Promises in a pool that limits their concurrency.

Motivation

An ECMAScript 2015 Promise is a great way to handle asynchronous operations. The Promise.all function provides an easy interface to let a bunch of promises settle concurrently.

However, it's an all-or-nothing approach: all your promises get created simultaneously. If you have a ton of operations that you want to run with some concurrency, Promise.all is no good.

Instead, you probably want to limit the maximum number of simultaneous operations. That's where this module comes in. It provides an easy way of waiting for any number of promises to settle, while imposing an upper bound on the number of simultaneously executing promises.

The promises can be created in a just-in-time fashion. You essentially pass a function that produces a new promise every time it is called. Alternatively, you can pass an ES2015 iterator, meaning you can also use generator functions.

Compatibility

This module can be used both under Node.js and on the Web. If your platform does not have a native Promise implementation, you can use a polyfill such as ES6-Promise.

Installation

npm install --save es6-promise-pool
bower install --save es6-promise-pool
<script src="es6-promise-pool.js"></script>

Usage

// On the Web, leave out this line and use the script tag above instead.
var PromisePool = require('es6-promise-pool')

var promiseProducer = function () {
  // Your code goes here.
  // If there is work left to be done, return the next work item as a promise.
  // Otherwise, return null to indicate that all promises have been created.
  // Scroll down for an example.
}

// The number of promises to process simultaneously.
var concurrency = 3

// Create a pool.
var pool = new PromisePool(promiseProducer, concurrency)

// Start the pool.
var poolPromise = pool.start()

// Wait for the pool to settle.
poolPromise.then(function () {
  console.log('All promises fulfilled')
}, function (error) {
  console.log('Some promise rejected: ' + error.message)
})

Producers

The PromisePool constructor takes a Promise-producing function as its first argument. Let's first assume that we have this helper function that returns a promise for the given value after time milliseconds:

var delayValue = function (value, time) {
  return new Promise(function (resolve, reject) {
    console.log('Resolving ' + value + ' in ' + time + ' ms')
    setTimeout(function () {
      console.log('Resolving: ' + value)
      resolve(value)
    }, time)
  })
}

Function

Now, let's use the helper function above to create five such promises, which are each fulfilled after a second. Because of the concurrency of 3, the first three promises will be fulfilled after one second. Then, the remaining two will be processed and fulfilled after another second.

var count = 0
var promiseProducer = function () {
  if (count < 5) {
    count++
    return delayValue(count, 1000)
  } else {
    return null
  }
}

var pool = new PromisePool(promiseProducer, 3)

pool.start()
  .then(function () {
    console.log('Complete')
  })

Iterator

We can achieve the same result with ECMAScript 2015 iterators. Since ES2015 generator functions return such an iterator, we can make the example above a lot prettier:

const generatePromises = function * () {
  for (let count = 1; count <= 5; count++) {
    yield delayValue(count, 1000)
  }
}

const promiseIterator = generatePromises()
const pool = new PromisePool(promiseIterator, 3)

pool.start()
  .then(() => console.log('Complete'))

It's also possible to pass a generator function directly. In that case, it will be invoked with no arguments and the resulting iterator will be used. This feature will however be removed in version 3.

Events

We can also ask the promise pool to notify us when an individual promise is fulfilled or rejected. The pool fires fulfilled and rejected events exactly for this purpose.

var pool = new PromisePool(promiseProducer, concurrency)

pool.addEventListener('fulfilled', function (event) {
  // The event contains:
  // - target:    the PromisePool itself
  // - data:
  //   - promise: the Promise that got fulfilled
  //   - result:  the result of that Promise
  console.log('Fulfilled: ' + event.data.result)
})

pool.addEventListener('rejected', function (event) {
  // The event contains:
  // - target:    the PromisePool itself
  // - data:
  //   - promise: the Promise that got rejected
  //   - error:   the Error for the rejection
  console.log('Rejected: ' + event.data.error.message)
})

pool.start()
  .then(function () {
    console.log('Complete')
  })

Upgrading

Since version 2.0.0, this module does not depend on ES6-Promise anymore. If you want to support platforms without a native Promise implementation, please load a polyfill first.

If you prefer not to polyfill the global Promise for whatever reason, you can also pass your Promise class as an option instead:

var ES6Promise = require('es6-promise').Promise // or another implementation
var pool = new PromisePool(promiseProducer, concurrency, {promise: ES6Promise})

Alternatives

Author

Tim De Pauw

License

MIT

es6-promise-pool's People

Contributors

bcherny avatar greenkeeper[bot] avatar timdp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

es6-promise-pool's Issues

An in-range update of standard is breaking the build 🚨

Version 10.0.3 of standard just got published.

Branch Build failing 🚨
Dependency standard
Current Version 10.0.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As standard is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v10.0.3
  • Internal changes (incremented dependency versions)
Commits

The new version differs by 99 commits.

  • 91e80a1 10.0.3
  • 82a0d5c changelog
  • d22676e Merge pull request #963 from daper/patch-1
  • cfb84fe Remove tilde to lock down eslint-config-standard-jsx version
  • 4a6e0d0 Update dependecy of eslint-config-standard-jsx
  • ac9e09e Merge pull request #961 from igorsantos07/patch-1
  • 873bc9b Adding valid example for no-unsafe-negation
  • f00b169 more feross/standard -> standard/standard
  • 9770303 Merge pull request #954 from standard/security
  • 8cc2285 Add a security policy
  • 2fa8b0f change more feross/standard -> standard/standard
  • e79a692 Merge branch 'devjin0617-translation-kr'
  • 34490f7 Merge branch 'translation-kr' of https://github.com/devjin0617/standard into devjin0617-translation-kr
  • 6d59566 Merge pull request #953 from standard/translations
  • 3895bc6 move english readme/rules to docs/ folder

There are 99 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Typescript definition file is not in the package

The typescript definition file is in the repository but missing in the npm package.

btw: If the methods would have also a small but nice description it would be even better :)) Some of them are not so clean on the first sight.

Sharing ideas

First of all, thank you for your library! I wish I would have found it earlier. Since I couldn't find it earlier, I wrote my own approach to dealing with throttling and load balancing when it comes to promises: spex

I think we had similar ideas, but they became very different implementations nonetheless :) I think much of what you consider a pool-approach, I implemented as a sequence and page methods.

Once before I tried to pursue the author of Bluebird to throw in some basic methods for throttling promises, but nothing ever came out of it. And many people stumble upon the same issues on and on. Bluebird guys would always throw at you methods like .settle and .reduce, but they aren't an adequate solution at all.

Anyhow, if you want to share some thoughts on it, it will be interesting.

Cheers!

An in-range update of bluebird is breaking the build 🚨

Version 3.5.1 of bluebird just got published.

Branch Build failing 🚨
Dependency bluebird
Current Version 3.5.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As bluebird is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v3.5.1

Bugfixes:

  • Fix false positive unhandled rejection when using async await (#1404)
  • Fix false positive when reporting error as non-error (#990)
Commits

The new version differs by 26 commits.

  • dcfa52b Release v3.5.1
  • 48c8591 Fixes #1404
  • 3c93a91 Revert "Update default.html"
  • 5155a7b Merge pull request #1463 from gabegorelick/isError
  • 3f7ccf4 Better error check
  • f8f4a01 Merge pull request #1462 from themez/patch-1
  • 18891c9 Fix title style
  • b2b14c2 Update default.html
  • a61aa1c tiny grammar change (#1457)
  • 2c9f7a4 Update tap.md (#1438)
  • 3a7fcbb fixes markdow headers (#1437)
  • e889c0d Correct a tiny tiny typo (#1431)
  • e03f12c improve .all() docs (#1436)
  • 4f90934 Updated links (#1420)
  • 3d2e57f Add Node.js 7+8 to Travis build matrix (#1412)

There are 26 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

es6_promise_pool_1.default is not a constructor

I am using Typesript v2.5.2

Here is the code I use-

import PromisePool from 'es6-promise-pool';
let promiseRunner = async (producerFunc, concurrency) => {
    let pool = new PromisePool(producerFunc, concurrency);
    await pool.start();
};

I get the error es6_promise_pool_1.default is not a constructor.

An in-range update of karma is breaking the build 🚨

Version 1.7.1 of karma just got published.

Branch Build failing 🚨
Dependency karma
Current Version 1.7.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As karma is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 3 commits.

  • ee40570 chore: release v1.7.1
  • 66b08e6 chore: update contributors
  • ea32194 feat(deps): add support for node@8

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Make the PromisePool reusable for multiple batch of tasks

Hi Tim,

I am not sure whether we could make the PromisePool object reusable, which means I can call the start() multiple times, even if the pool has finished the tasks.

My scenario is something as follows:
The tasks (promises) are gradually generated and stored in a list. I want to start the tasks once the first batch of tasks is ready, so the start() will be called before all the tasks are generated. If I got some new tasks later, I can add them to the list (or pool) and the PromisePool can just keep working. The concurrency number should always be limited there.

The current problem is, if the task generator reached the end of the task list, the PromisePool will permanently stop. Even if I add new tasks and call the start() again. It is stopped by the _done variable. If we can reset the _done variable to "false" when the start() is called, the PromisePool should be able to keep working on the new tasks.

I cannot create a new PromisePool for the new tasks either, as the previous pool may still be working. If a new pool is created, the number of concurrently running tasks may exceed the limitation, as each pool can reach the max.

TypeScript declarations are failing on iterables

Hello!

Thank you for this great library!

However, when I try to use iterable with it, the compilers throws errors:

let i = 1;

const generator = function * () {
  while (true) {
    yield new Promise(resolve => {
      const j = i++;
      console.log('Starting to process #' + j);
      setTimeout(() => {
        console.log('Finished processing #' + j);
        resolve();
      }, 1000);
    });
  }
};

const pool = new PromisePool(
  generator(),
  // Argument of type 'IterableIterator<Promise<{}>>' is not assignable to parameter of
  // type '() => void | PromiseLike<{}>'. Type 'IterableIterator<Promise<{}>>' provides
  // no match for the signature '(): void | PromiseLike<{}>'.
  10
);

pool.start().then(() => console.log('Complete'));

So I have to call it this way in order to suppress the error: new PromisePool(generator() as any, 10);.

Maybe, the declaration should be changed to:

source: () => PromiseLike<A> | IterableIterator<Promise<A>> ?

Thanks!

Can I change concurrency at runtime?

Hello, @timdp .
I found pool.concurrency(Number) on history issue.

So I try to change the value of concurrency in different places, but did not run as expected.

This is my code:

let count = 0;
let pool = null;

let PromiseProducer = () => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            ++count;
            // pool.concurrency(3); // run(1,2,3) and code exit
            // pool.concurrency(1); // run(1,2) and code exit
            return resolve(count);
        }, 1000);
    });
};

pool = new PromisePool(PromiseProducer, 2);

pool.addEventListener('fulfilled', (event) => {
    console.log('Fulfilled', event.data.result);
    // pool.concurrency(3); // run(1,2,3,4) after throw error and exit
});

// pool.concurrency(3); // only change before start()
pool.start().then(() => { }).catch((err) => { console.log(err); });

Can I change concurrency after start and run forever ?

Waiting for your reply, thanks!πŸ˜ƒ

An in-range update of mocha-junit-reporter is breaking the build 🚨

Version 1.14.0 of mocha-junit-reporter just got published.

Branch Build failing 🚨
Dependency mocha-junit-reporter
Current Version 1.13.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha-junit-reporter is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 4 commits.

  • f7870cb 1.14.0
  • d036eec Add parameters for configuring xml output (#50)
  • 544538d Feature configurable classname and name switch (#52)
  • fd32f09 Added missing word (#47)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

Version 3.4.2 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.4.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes fake-success

3.4.2 / 2017-05-24

πŸ› Fixes

πŸ”© Other

Commits

The new version differs by 7 commits.

  • a15b20a :ship: Release v3.4.2
  • fc802a9 :memo: Add Changelog for v3.4.2
  • 10ff0ec Eagerly set process.exitCode (#2820)
  • fc35691 Merge pull request #2818 from makepanic/issue/2802
  • 3e7152f Remove call to deprecated os.tmpDir (#2802)
  • e249434 Merge pull request #2807 from mochajs/npm-script-lint
  • 17a1770 Move linting into an npm script. Relates to #2805

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

get net::ERR_SPDY_PROTOCOL_ERROR

I am developing an in-browser downloader.
Say I have 100 files on the server, I use promises and this pool to download each one of them and pack them into a zip file, and finally give it to users.
When the file is small, it works perfectly. However, when files are big, I got net::ERR_SPDY_PROTOCOL_ERROR from chrome.
If it helps, these are what's in the Network panel of chrome dev tool:
image
image
... and after around 3 minutes of downloading and waiting, I got
image
image

Follow es6 promise.all

This relates to issue #7 in that the expected / desirable result would be that the results of the promises would be passed to the then function. I have not checked other parameters for compatibility as .then(data => {}) is really the most necessary use case.

Since based on issue #7 I didn't want to create a pull request unless you deemed it fit, but for anyone else that might be looking a way of doing this can be as follows:

'use strict';

const Es6PromisePool = require('es6-promise-pool');

/**
 * Promise Pool
 *
 * Extends the es6-promise-pool class to enable it to function much
 * like Promise.all() functions by returning the array of results.
 */
class PromisePool extends Es6PromisePool {
  /**
   * Constructor
   *
   * @param {Function} source - function to generate data
   * @param {Number} concurrency - amount of concurrency
   * @param {Object} options - key value pairs of options
   */
  constructor(source, concurrency, options) {
    super(source, concurrency, options);
    this.resolves = [];
  }

  /**
   * Start
   *
   * @return {Promise}
   */
  start() {
    this.addEventListener('fulfilled', (event) => {
      this.resolves.push(event.data.result);
    });

    return super.start().then(() => {
      return Promise.resolve(this.resolves);
    });
  }
}

module.exports = PromisePool;

Change concurrency

Can I call .start() and then subsequently change concurrency, it that supported behaviour?

Cancellable?

Hey @timdp, great project! I'm currently using it to concurrently upload chunks of large video files directly to Azure blob storage. I've gained a ton of throughput and my code is much cleaner.

I have a use case that involves cancellation. Much like Google Drive's uploader, I want each file added to my uploader to be cancellable. When Uploader.cancel() is called, we flip this.cancelled to prevent new Promises from being produced; this halts the pool.

However, at that point, the pool still has as many as 4 pending promises, each uploading a chunk of data in an ajax request. Ideally, I'd like to ask the pool to call the .abort method on each ajax request's returned XHR object to kill the network transfers.

Do you have any recommendation on how to do this? Right now, I store each returned XHR object in a member Array (this.xhrs), and when Uploader.cancel() is called, I iterate through this.xhrs and call abort on each. It's a little sloppy.

Here's the gist:

import PromisePool from 'es6-promise-pool';

class Uploader {
    constructor (file) {
        this.file = file;
        this.bytesRemaining = file.size;
        this.cancelled = false;
        this.pool = {};
    }

    upload () {
        this.pool = PromisePool(this.chunkUploadProducer, 4)
            .start()
            .then(() => {}, (error) => { throw error })
    } 

    cancel () {
        // This will prevent new promises from being produced
         this.cancelled = true;

        // But how do we call into the pool
        // and tell it to abort the current ajax requests?
    }

    chunkUploadProducer () {
        if (this.bytesRemaing > 0 && !this.cancelled) {
            return this.uploadChunk().catch(error => { throw error });
        } 

        return null;
    }

    uploadChunk () {
        return this.readChunkFromFile()
             .then((chunk) => {
                // the XHR object returned from the $.ajax call
                // has a .abort() method that we can call to terminate
                // data transfer
                 return $.ajax({
                     url: 'www.azure.com/blob/{containerId}',
                     data: chunk
                     // other config
                 })
             });
    }

   readChunkFromFile () { // do some file processing }

Eager to hear your insight. Thanks again!

An in-range update of karma-coverage is breaking the build 🚨

Version 1.1.2 of karma-coverage was just published.

Branch Build failing 🚨
Dependency karma-coverage
Current Version 1.1.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

karma-coverage is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v1.1.2

Bug Fixes

  • build: Update to lodash 4 (d6d21d2), closes #242
  • reporter: replace colons in the output path (3b2bffa)

BREAKING CHANGES

  • reporter: the output folder names change, they no longer contain :
Commits

The new version differs by 12 commits.

  • 070bba3 chore: release v1.1.2
  • 9319dfb chore: update contributors
  • 9433b24 Merge pull request #339 from johnjbarton/fix-242
  • bf599db Merge pull request #344 from AndrewLane/AndrewLane-patch-1
  • 595ab98 Fix exclude typo on the check object
  • d6d21d2 fix(build): Update to lodash 4
  • 954a555 Merge pull request #345 from johnjbarton/engines
  • d4695cf Update travis to match parent karma project
  • 54737bf chore: add grunt-cli npm test works out of the box
  • 2bc4aa5 docs: add json-summary report type
  • 3b2bffa fix(reporter): replace colons in the output path
  • 1a876d5 docs: Added none as possible value for type

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of mocha-junit-reporter is breaking the build 🚨

Version 1.16.0 of mocha-junit-reporter was just published.

Branch Build failing 🚨
Dependency mocha-junit-reporter
Current Version 1.15.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

mocha-junit-reporter is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

PromiseProducer must not be async

Ran into an issue where I wanted to have an async PromiseProducer work function, but since an async function always returns a promise, the pool would never end.

Not sure if this is truly an issue but a note in the documentation might help others from the same pitfall.

How to add to pool while it's running?

How can I add work to a pool while it's already running and make it return only that part of work after that part was finished? I need a pool that's is supposed to run multiple requests in a single pool, requests come from different functions and while pool is still running some old requests. The only requirement is to not to run more that a number of requests simultaneously.

An in-range update of bluebird is breaking the build 🚨

Version 3.5.2 of bluebird was just published.

Branch Build failing 🚨
Dependency bluebird
Current Version 3.5.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

bluebird is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Release Notes v3.5.2

Bugfixes:

  • Fix PromiseRejectionEvent to contain .reason and .promise properties. (#1509, #1464)
  • Fix promise chain retaining memory until the entire chain is resolved (#1544, #1529)

id: changelog
title: Changelog

Commits

The new version differs by 22 commits.

  • 50067ec Release v3.5.2
  • f290da0 Fix memory being retained until promise queue is completely empty (#1544)
  • ad6d763 Update benchmarks (#1539)
  • 49da1ac Fix a typo. (#1534)
  • b06106a Fix typo in readme introduced in #1530 (#1531)
  • c1dc5b9 Update README.md (#1530)
  • e35455f chore: clone last 5 commits (#1521)
  • 91ae9ce chore: add Node.js 10 (#1523)
  • 9159472 Added a simple usage example (#1369)
  • 39081ba Update promise.each.md (#1479)
  • 77781fe Fix header (#1513)
  • b8eedc1 Update LICENSE to 2018 (#1490)
  • 4163e82 Added ES6 way to import the bluebird promise (#1461)
  • 3790a92 DOC: add direct link to Promise.delay from API ref (#1465)
  • e8d8525 Update error documentation (#1469)

There are 22 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of es6-promise is breaking the build 🚨

Version 4.2.0 of es6-promise was just published.

Branch Build failing 🚨
Dependency es6-promise
Current Version 4.1.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

es6-promise is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 18 commits.

  • b87f240 release v4.2.0 πŸŽ‰
  • 2faa619 Merge pull request #312 from stefanpenner/remove-dist
  • aed7aed [fixes #231]
  • 915dc5d Update README.md
  • 110dc75 restore minified files to repo (really need to start publishing these
  • 64493b6 Merge pull request #289 from stefanpenner/cleanup
  • 9d97fb8 cleanup
  • d8f56ac Merge pull request #233 from stefanpenner/promise.finally
  • 14ca840 Promise.prototype.finally [fixes #232]
  • 18897d3 Merge pull request #310 from stefanpenner/updates
  • 8f96141 updates
  • 44298db Merge pull request #304 from Lcfvs/patch-1
  • 08a8a4d Bump ember-cli dep
  • e1bb7b6 Merge pull request #306 from LukasDrgon/patch-1
  • 4f078b2 Add CDN links

There are 18 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

concurrency of 1, does it guarantee order?

I haven't uses this lib before but considering it - one question I have is - given a concurrency of 1, and I pass multiple promises to the pool, does this lib guarantee the order of which they get run? In other words, they should run in series, but I want to make sure if A is passed before B, that A will always complete before B starts executing. Thanks!

An in-range update of coveralls is breaking the build 🚨

Version 2.13.2 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.13.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 3 commits.

  • 5ebe57f bump version
  • 428780c Expand allowed dependency versions to all API compatible versions (#172)
  • eb1b723 Update Mocha link (#169)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of console-stamp is breaking the build 🚨

Version 0.2.6 of console-stamp was just published.

Branch Build failing 🚨
Dependency console-stamp
Current Version 0.2.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

console-stamp is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes Version 0.2.6

Alternative pre- and suffixes for date stamps and labels and improved readme

Commits

The new version differs by 5 commits.

  • 848b699 Added contributors and bumping version
  • 899de3c Merge pull request #28 from OmgImAlexis/master
  • 43a9e24 Merge branch 'master' into master
  • 6259131 Added options to alter pre- and suffixes for date stamps and labels
  • 03b73ab lint code, fix syntax highlighting and change var -> const

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of es6-promise is breaking the build 🚨

Version 4.1.1 of es6-promise just got published.

Branch Build failing 🚨
Dependency es6-promise
Current Version 4.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As es6-promise is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 25 commits.

  • 7f82a56 release v4.1.1 πŸŽ‰
  • 8a9da19 update dist
  • f046478 Merge pull request #295 from bekzod/remove-object-equals
  • 3618c88 Merge pull request #296 from bekzod/fix-catch
  • f6a08f4 calling .catch directly and removed keysOf
  • 083ff55 remove objectEquals
  • 476838e Merge pull request #294 from bekzod/dont-use-input
  • f496839 don't store input in enumerator
  • 10a6859 Merge pull request #288 from bekzod/small-util-cleanup
  • b844617 small cleanup in util
  • b37a3d0 Merge pull request #283 from stefanpenner/greenkeeper-ember-cli-2.12.2
  • 9da2db5 Merge pull request #284 from bradoyler/patch-1
  • 7266c29 fix npm SEO for 'promise polyfill'
  • 9a207cf chore(package): update ember-cli to version 2.12.2
  • e483c20 Merge pull request #280 from stefanpenner/greenkeeper-release-it-2.7.1

There are 25 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of console-stamp is breaking the build 🚨

The devDependency console-stamp was updated from 0.2.6 to 0.2.7.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

console-stamp is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 2 commits.

  • aeb14d5 0.2.7
  • ab83a19 As of node version 10.0.0 the console.assert implementation is spec compliant and does not throw anymore. We now handle the failing assert and prevent it from do internal calls to warn. This fixes #29

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Throw in a promise stops the rest of the promises in the pool from continuing

Hi,

Once I get an error from a promise (that I catch in the eventListener for 'rejected') the rest of the promises don't get executed and the promisepool enters pool.start().catch(error => {//code}) directly.
One example, the promisepool had 132 promises to fulfill with a concurrency of 10. Around the 12th promise it entered the rejected, then the start().catch and stopped.
The specific error message that is throwing is Deadline Exceeded, from Firebase Functions
Is that a bug or a miss-configuration from my side?
I can provide sample code if required.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.