Skip to content

Commit

Permalink
Rename pool_name opt to db_pool
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Aug 4, 2021
1 parent f856c17 commit 7da39d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions doc/developers-guide/domain_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ Configure host-type first to delete such domains.

```toml
[services.service_domain_db]
pool_name = "global"
db_pool = "global"
event_cleaning_interval = 1800
event_max_age = 7200
```

### `pool_name`
### `db_pool`
By default, this service uses the RDBMS connection pool configured with the scope `"global"`.
You can put a specific host type there to use the pool with the `"host"` or `"single_host"` scope for that particular host type. See [outgoing connections docs](../advanced-configuration/outgoing-connections.md) for more information about pool scopes.

Pool name to use for a database connection.

* **Syntax:** atom
* **Syntax:** string
* **Default:** `global`
* **Example:** `pool_name = "global"`
* **Example:** `db_pool = "my_host_type"`

### `event_cleaning_interval`
The number of seconds between cleaning attempts of the `domain_events` table.
Expand Down
2 changes: 1 addition & 1 deletion src/domain/mongoose_domain_sql.erl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ row_to_map({HostType, Enabled}) ->
#{host_type => HostType, enabled => mongoose_rdbms:to_bool(Enabled)}.

get_db_pool() ->
proplists:get_value(pool_name, get_service_opts(), global).
proplists:get_value(db_pool, get_service_opts(), global).

get_service_opts() ->
mongoose_service:get_service_opts(service_domain_db).
Expand Down
4 changes: 2 additions & 2 deletions src/domain/service_domain_db.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ config_spec() ->
validate = positive},
<<"event_max_age">> => #option{type = integer,
validate = positive},
<<"pool_name">> => #option{type = atom,
validate = pool_name}
<<"db_pool">> => #option{type = atom,
validate = pool_name}
}}.

start_link() ->
Expand Down

0 comments on commit 7da39d8

Please sign in to comment.