We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3deb45 commit 5857eabCopy full SHA for 5857eab
1 file changed
config/initializers/que.rb
@@ -15,10 +15,17 @@
15
16
def Que.start!
17
require 'que/locker'
18
+ require 'que/db_connection_url'
19
20
# Workaround for https://github.com/chanks/que/pull/192
21
require 'active_record/base'
- Que.locker = Que::Locker.new(**Rails.application.config.x.que)
22
+
23
+ # Build connection URL with SSL parameters from database config
24
+ # Workaround for https://github.com/que-rb/que/issues/442
25
+ db_config = ActiveRecord::Base.connection_db_config.configuration_hash
26
+ connection_url = Que::DBConnectionURL.build_connection_url(db_config)
27
28
+ Que.locker = Que::Locker.new(connection_url: connection_url, **Rails.application.config.x.que)
29
end
30
31
def Que.stop!
0 commit comments