energizer91 / smart-request-balancer

Smart request queue with fine tuning of rate and limit of requests
MIT License
97 stars 8 forks source link

Rules don't apply? #11

Closed Zebusch closed 5 years ago

Zebusch commented 5 years ago

Hi!

Using this package, love it so far :) But i can't seem to get it to work with this example of rule definition:

const queue = new Queue({
    rules: {
        defaultRules: {
            rate: 10,            // 10 messages
            limit: 1,           // per second
            priority: 1
        }
    }
});

I still only get like 1 req per sec and not 10. Does not matter what i enter, i can have 500 req per minute and still i get the same throughput. Am i missing something in terms of what this package allows me to do or have i misunderstood something about the configuration?

muhaimincs commented 4 years ago

how do you solve it?