feature/IO-2967-Better-Refetch-Handling - Bug fixes and hardening

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-09-27 14:52:38 -04:00
parent 03761bbb2a
commit d705f8211e
3 changed files with 64 additions and 48 deletions

View File

@@ -192,7 +192,7 @@ const main = async () => {
const server = http.createServer(app);
const { pubClient, ioRedis } = await applySocketIO(server, app);
const api = applyRedisHelpers(pubClient, app);
const api = applyRedisHelpers(pubClient, app, logger);
const ioHelpers = applyIOHelpers(app, api, ioRedis, logger);
// Legacy Socket Events
@@ -211,11 +211,9 @@ const main = async () => {
};
// Start server
try {
main();
} catch (error) {
main().catch((error) => {
logger.log(`Main-API-Error: Something was not caught in the application.`, "error", "api", null, {
error: error.message,
errorjson: JSON.stringify(error)
});
}
});