axemclion/grunt-saucelabs — pull request #125 by gvas (2014-05-23 06:51:55+00:00)
Title: Changes in throttled

This PR modifies the ``throttled`` functionality added in #113. The number of the concurrent jobs will be limited to the exact number set in ``throttled`` instead of ``throttled * browsers.length``.

The code which starts the jobs was refactored to use promises more conventionally. It is now shorter and more maintainable. This change also has the additional benefit that the fix for #116 will be trivial (a new ``then()`` invocation has to be added to the promise chain which will invoke the ``onTestComplete()`` callback).