Skip to content

Commit 4347df7

Browse files
committed
Use .presence for queue_name_prefix in mailer_queue_name
Match ActiveJob's own queue name composition by using .presence instead of bare value, preventing a leading delimiter when the prefix is an empty string.
1 parent 70fc9d1 commit 4347df7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/advanced_sneakers_activejob/workers_registry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def advanced_sneakers_adapter?(klass)
104104
# Queue name from ActionMailer::Base.deliver_later_queue_name is not prefixed
105105
# and has no delimiter, so we need to add them manually
106106
def mailer_queue_name(mailer)
107-
[ActiveJob::Base.queue_name_prefix, mailer.deliver_later_queue_name.to_s].compact.join(ActiveJob::Base.queue_name_delimiter)
107+
[ActiveJob::Base.queue_name_prefix.presence, mailer.deliver_later_queue_name.to_s].compact.join(ActiveJob::Base.queue_name_delimiter)
108108
end
109109
end
110110
end

0 commit comments

Comments
 (0)