Changeset

12592:d580e6a57cbb 0.12

mod_storage_sql: Fix bypass of load procedure under prosodyctl There's no 'prosody.prosodyctl' property other than this one, introduced in 6216743c188c in 2015. Guessing that the intent was to skip this when running as a prosodyctl command. The module.command code does its own version of this initialization, so this seems likely. Thanks raja for noticing
author Kim Alvefur <zash@zash.se>
date Tue, 26 Jul 2022 00:39:16 +0200 (2022-07-25)
parents 12586:4c8941b5b05e
children 12593:1832b6c9c6ed
files plugins/mod_storage_sql.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Mon Jun 27 01:22:36 2022 +0200
+++ b/plugins/mod_storage_sql.lua	Tue Jul 26 00:39:16 2022 +0200
@@ -833,7 +833,7 @@
 end
 
 function module.load()
-	if prosody.prosodyctl then return; end
+	if prosody.process_type == "prosodyctl" then return; end
 	local engines = module:shared("/*/sql/connections");
 	local params = normalize_params(module:get_option("sql", default_params));
 	local db_uri = sql.db2uri(params);