kaliberjs / firebase-queue

A trimmed and more robust version of the original Firebase Queue
MIT License
20 stars 3 forks source link

numWorkers not working #12

Closed EECOLOR closed 5 years ago

EECOLOR commented 5 years ago

@itdev123:

const options = {
  spec: stage,
  numWorkers: workersetting.count
};

I set numWorkers like this but I found a worker was only running at the same time. Could you check again?

EECOLOR commented 5 years ago

@itdev123 We are not spawning separate threads for workers, so the node.js model dictates only one function is run at a time.

This means having multiple workers only makes sense when you have processing functions that call external services and wait a long time.

If you actually want multiple threads, run your program (or service) multiple times.

EECOLOR commented 5 years ago

You see the corresponding tests here: https://github.com/kaliberjs/firebase-queue/blob/master/tests/specs.js#L77

EECOLOR commented 5 years ago

No activity for a few weeks, closing the issue. Feel free to re-open it.