dc625123 by Bryan Batac

- Added fix

1 parent 66c9f735
Showing 1 changed file with 5 additions and 3 deletions
......@@ -577,15 +577,17 @@ const fetchAndFilterModels = async (client) => {
const getModels = async () => {
if (!client) {
client = initializeRedisClient();
client = await initializeRedisClient();
await client.connect();
try {
await client.connect();
filteredModels = await fetchAndFilterModels(client);
console.log('Connected to Redis successfully');
} catch (err) {
console.error('Error connecting to Redis:', err);
throw err;
}
}
if (Object.keys(filteredModels).length === 0) {
filteredModels = await fetchAndFilterModels(client);
}
};
\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!