mxl/laravel-queue-rate-limit

Rate job limiting doesn't seem to work

Opened this issue · 0 comments

I configured the rate limit like this:
'rateLimits' => [
'queue' => [
'allows' => 1,
'every' => 60
],

If I understand correctly the job should be staying in the database table "jobs" for 60 seconds before they are taken out of the database job queue? But the Available_at and Created_at always have the same value and the job seems to be taken out very quickly not respecting the rate limit.

I tried to set it to a very long delay but it would not stay in the job table, they are just quickly taken out.

This is what I see in the table.
Payload:
{"uuid":"4eb7a0a5-1404-4186-af37-b04bd2f779d1","displayName":"App\Jobs\PaymentJob","job":"Illuminate\Queue\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"delay":null,"timeout":null,"timeoutAt":null,"data":{"commandName":"App\Jobs\PaymentJob","command":"O:19:"App\Jobs\PaymentJob":9:{s:10:"\u0000*\u0000details";a:1:{s:4:"data";s:9:"something";}s:3:"job";N;s:10:"connection";N;s:5:"queue";N;s:15:"chainConnection";N;s:10:"chainQueue";N;s:5:"delay";N;s:10:"middleware";a:0:{}s:7:"chained";a:0:{}}"}} 0 1617912273 1617912273
Attempts: 0
Reserved_at: null
available_at: 1617912273
created_at: 1617912273