Set postgres_dsn as soon as zk client is initialized
@@ -3268,6 +3268,12 @@ class Djinn
pick_zookeeper(@zookeeper_data)
set_custom_config
start_log_server
+ if @options.key?('postgres_dsn')
+ ZKInterface.set_postgres_dsn(@options['postgres_dsn'])
+ end
+ if @options.key?('fdb_clusterfile_content')
+ ZKInterface.set_fdb_clusterfile_content(@options['fdb_clusterfile_content'])
+ end
else
stop_log_server
end
@@ -3561,10 +3567,6 @@ class Djinn
end
def start_taskqueue_master
- if @options.key?('postgres_dsn')
- ZKInterface.set_postgres_dsn(@options['postgres_dsn'])
- end
-
verbose = @options['verbose'].downcase == "true"
TaskQueue.start_master(false, verbose)
return true
@@ -3575,10 +3577,6 @@ class Djinn
end
def start_taskqueue_slave
- if @options.key?('postgres_dsn')
- ZKInterface.set_postgres_dsn(@options['postgres_dsn'])
- end
-
# All slaves connect to the master to start
master_ip = nil
@state_change_lock.synchronize {
@@ -3665,7 +3663,6 @@ class Djinn
backend = 'cassandra'
if @options.key?('fdb_clusterfile_content')
- ZKInterface.set_fdb_clusterfile_content(@options['fdb_clusterfile_content'])
backend = 'fdb'
end
