-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
priority queue #21
base: main
Are you sure you want to change the base?
priority queue #21
Conversation
'redis_high' => [ | ||
'driver' => 'redis', | ||
'connection' => 'default', | ||
'queue' => 'high', | ||
'retry_after' => 90, | ||
'block_for' => null, | ||
'after_commit' => false, | ||
], | ||
'redis_low' => [ | ||
'driver' => 'redis', | ||
'connection' => 'default', | ||
'queue' => 'low', | ||
'retry_after' => 90, | ||
'block_for' => null, | ||
'after_commit' => false, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although we're defining these new connections, no job is using them. The jobs have different queues associated, but since we're not declaring different connections, they're all being sent to the default connection (redis
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have defined the low or high in some jobs: https://github.com/FogosPT/fogosapi/blob/feature/14-priority-queue/app/Observers/IncidentObserver.php#L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed it, but the queue name is not the connection name, which was what we are defining here. We can have one connection that handles multiple queues. So, to put it simply: we should keep one Redis connection.
| | ||
*/ | ||
|
||
'default' => env('QUEUE_CONNECTION', 'sync'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the default set as sync
because of the scheduled jobs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's the default, didn't change it. Should it be redis_low
or redis_high
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just redis
.
No description provided.