sekwah41 / spq

Simple Promise Queue
MIT License
0 stars 0 forks source link

Add a basic rate limiter #59

Open sekwah41 opened 1 year ago

sekwah41 commented 1 year ago

It won't hard enforce anything, but this is just to stop it from running at max speed in case anything in use by the queue may have a rate limiter.

sekwah41 commented 1 year ago

It will list how many can run before a cooldown will kick in.

Additional events would also be helpful in these cases.

sekwah41 commented 1 year ago

The ability to update the values with a function would he helpful. Also the ability to state a max batch size and the current batch size. E.g. if you are handling data from twitter you may want to query at the start to get the quota remaining in case it was already partially used.