From bdd19a8e5ca5cd9c3f29997e4cbb378927615ef9 Mon Sep 17 00:00:00 2001 From: cryptofyre Date: Thu, 8 Aug 2024 20:55:38 -0500 Subject: [PATCH] Refactor server.mjs to remove error handling for processing URL in processStream function --- server.mjs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server.mjs b/server.mjs index dc63c8a..007afb5 100644 --- a/server.mjs +++ b/server.mjs @@ -16,7 +16,6 @@ const __dirname = path.dirname(__filename); const app = express(); const port = 3000; const cacheDir = path.join(__dirname, 'cache'); -const MAX_STORAGE = 100 * 1024 * 1024 * 1024; // 100GB // Ensure cache directory exists if (!fs.existsSync(cacheDir)) { @@ -79,10 +78,6 @@ const processStream = async (url, key, jobId) => { .on('progress', (progress) => { logger.info(`Job ${jobId}: Processing - ${JSON.stringify(progress)}`); }) - .on('error', (err) => { - logger.error(`Job ${jobId}: Error processing URL ${url} - ${err.message}`); - reject(err); - }) .on('end', () => { logger.info(`Job ${jobId}: Processing completed for URL ${url}`); resolve(gifPath);