()
| 246 | |
| 247 | |
| 248 | def _configs_for_db_operation(): |
| 249 | hosts = set() |
| 250 | |
| 251 | for cfg in config.Config.all_configs(): |
| 252 | cfg.db.dispose() |
| 253 | |
| 254 | for cfg in config.Config.all_configs(): |
| 255 | url = cfg.db.url |
| 256 | backend = url.get_backend_name() |
| 257 | host_conf = (backend, url.username, url.host, url.database) |
| 258 | |
| 259 | if host_conf not in hosts: |
| 260 | yield cfg |
| 261 | hosts.add(host_conf) |
| 262 | |
| 263 | for cfg in config.Config.all_configs(): |
| 264 | cfg.db.dispose() |
| 265 | |
| 266 | |
| 267 | @register.init |
no test coverage detected