syncapi: Add configuration for the account database

This commit is contained in:
Robert Swain 2017-06-03 12:04:25 +02:00
parent ef7b934d51
commit aa17cf83ac
2 changed files with 3 additions and 2 deletions

View file

@ -76,8 +76,7 @@ func main() {
log.Panicf("startup: failed to create sync server database with data source %s : %s", cfg.DataSource, err)
}
// TODO: DO NOT USE THIS DATA SOURCE (it's the sync one, not devices!)
deviceDB, err := devices.NewDatabase(cfg.DataSource, cfg.ServerName)
deviceDB, err := devices.NewDatabase(cfg.AccountDataSource, cfg.ServerName)
if err != nil {
log.Panicf("startup: failed to create device database with data source %s : %s", cfg.DataSource, err)
}

View file

@ -26,6 +26,8 @@ type Sync struct {
KafkaConsumerURIs []string `yaml:"consumer_uris"`
// The postgres connection config for connecting to the database e.g a postgres:// URI
DataSource string `yaml:"database"`
// The postgres connection config for connecting to the account database e.g a postgres:// URI
AccountDataSource string `yaml:"account_database"`
// The server_name of the running process e.g "localhost"
ServerName gomatrixserverlib.ServerName `yaml:"server_name"`
}