evanlucas / gcr

A node gitlab-ci-runner
MIT License
51 stars 12 forks source link

Swapping val and key for queue callback #26

Closed bushong1 closed 8 years ago

bushong1 commented 8 years ago

If builds get queued, there will be an explosion. Looks like the forEach callback was written as (key, value) instead of (value, key).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach

Sample .gitlab-ci.yml to test for yourself.

job1:
  script:
  - date
  - sleep 15

job2:
  script:
  - echo 'Hello World!'
  - sleep 15

job3:
  script:
  - echo "Foo!"
  - sleep 15
bushong1 commented 8 years ago

These travis errors are original to current master branch.

EDIT: fixed on master