Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 12595:0572b6e604a3
Merge 0.12->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 27 Jul 2022 00:10:08 +0200 |
| parent | 12589:39ae08180c81 |
| parent | 12592:d580e6a57cbb |
| child | 12600:3d3a0c4e2662 |
comparison
equal
deleted
inserted
replaced
| 12594:29685403be32 | 12595:0572b6e604a3 |
|---|---|
| 830 port = params.port; | 830 port = params.port; |
| 831 }; | 831 }; |
| 832 end | 832 end |
| 833 | 833 |
| 834 function module.load() | 834 function module.load() |
| 835 if prosody.prosodyctl then return; end | 835 if prosody.process_type == "prosodyctl" then return; end |
| 836 local engines = module:shared("/*/sql/connections"); | 836 local engines = module:shared("/*/sql/connections"); |
| 837 local params = normalize_params(module:get_option("sql", default_params)); | 837 local params = normalize_params(module:get_option("sql", default_params)); |
| 838 local db_uri = sql.db2uri(params); | 838 local db_uri = sql.db2uri(params); |
| 839 engine = engines[db_uri]; | 839 engine = engines[db_uri]; |
| 840 if not engine then | 840 if not engine then |