Skip to content
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

Allow using queue prefix with a default queue name #34376

Merged
merged 1 commit into from Nov 23, 2018

Conversation

Projects
None yet
4 participants
@composerinteralia
Copy link
Member

commented Nov 4, 2018

Fixes #34366

Currently setting queue_name_prefix will not combine a prefix with the
default_queue_name; it will only affect queue names set with queue_as.
With this PR the prefix will affect the default_queue_name as well.

Closes #19831

Currently setting default_queue_name doesn't actually affect the
queue_name default (although default_queue_name does get used if you
pass a falsey part_name to queue_as). This PR would get
default_queue_name working as expected as well.

Because the queue_name default is now a lambda wrapping the
default_queue_name, rather than the default_queue_name itself, I had to
update one test to use the instance method #queue_name (which
instance_execs the value) instead of the class method. I think this
change is OK, since only the instance method is documented.

There was a question about whether we want a default_queue_name
configuration. If we want to get rid of it, I would also be happy to
open a PR for that instead. It has been around for a while now, but it
also hasn't really worked for a while now.

r? @matthewd
since you had an opinion about this before

Allow using queue prefix with a default queue name
Fixes #34366

Currently setting queue_name_prefix will not combine a prefix with the
default_queue_name; it will only affect queue names set with `queue_as`.
With this PR the prefix will affect the default_queue_name as well.

Closes #19831

Currently setting default_queue_name doesn't actually affect the
queue_name default (although default_queue_name does get used if you
pass a falsey `part_name` to `queue_as`). This PR would get
default_queue_name working as expected as well.

Because the queue_name default is now a lambda wrapping the
default_queue_name, rather than the default_queue_name itself, I had to
update one test to use the instance method `#queue_name` (which
`instance_exec`s the value) instead of the class method. I think this
change is OK, since only the instance method is documented.

There was a question about whether we want a `default_queue_name`
configuration. If we want to get rid of it, I would also be happy to
open a PR for that instead. It has been around for a while now, but it
also hasn't really worked for a while now.

r? @matthewd
since you had an opinion about this before

@composerinteralia composerinteralia force-pushed the composerinteralia:default_queue_name branch from 688d16e to b517347 Nov 4, 2018

@Edouard-chin
Copy link
Contributor

left a comment

👍

@rafaelfranca rafaelfranca merged commit f0330b6 into rails:master Nov 23, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@composerinteralia composerinteralia deleted the composerinteralia:default_queue_name branch Nov 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.