diff --git a/src/config/redis.config.js b/src/config/redis.config.js deleted file mode 100644 index e11915b..0000000 --- a/src/config/redis.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - REDIS_HOST: process.env.REDIS_HOST, - REDIS_PORT: process.env.REDIS_PORT -} \ No newline at end of file diff --git a/src/controllers/intent.controller.js b/src/controllers/intent.controller.js index 20ed7bd..69fd313 100644 --- a/src/controllers/intent.controller.js +++ b/src/controllers/intent.controller.js @@ -45,8 +45,6 @@ exports.getIntentCommand = async (req, res) => { console.log(`\n[Backend Intents] Processing intent.`); - await redis.client.connect().catch(console.error) - const intent = await Intent.findOne({ where: { description: req.body.text } }); if (intent) { @@ -61,8 +59,6 @@ exports.getIntentCommand = async (req, res) => { } ); - await redis.client.quit(); - console.log(`Intent matched and published to stream: ${commandId}`); return res.json({ @@ -82,8 +78,6 @@ exports.getIntentCommand = async (req, res) => { } ); - await redis.client.quit(); - console.log(`No intent match, error published: ${errorId}`); return res.status(400).json({ @@ -95,8 +89,6 @@ exports.getIntentCommand = async (req, res) => { }); } } catch (err) { - await redis.client.quit(); - console.error("getIntentCommand error:", err); return res.status(500).send({message: err.message || "Internal server error."});