Skip to content

Commit

Permalink
Refactor server.mjs to remove error handling for processing URL in pr…
Browse files Browse the repository at this point in the history
…ocessStream function
  • Loading branch information
cryptofyre committed Aug 9, 2024
1 parent 8d83815 commit bdd19a8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bdd19a8

Please sign in to comment.