Skip to content

Commit

Permalink
try-catch and logs to runner and redisHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
neSpecc committed Jan 31, 2025
1 parent 0e72860 commit f200a07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,8 @@ class WorkerRunner {
}

// eslint-disable-next-line no-new
new WorkerRunner();
try {
new WorkerRunner();

Check failure on line 307 in runner.ts

View workflow job for this annotation

GitHub Actions / ESlint

Do not use 'new' for side effects
} catch (error) {
console.error('Error running worker runner', error);
}
3 changes: 2 additions & 1 deletion workers/grouper/src/redisHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export default class RedisHelper {
constructor() {
try {
this.redisClient = createClient({ url: process.env.REDIS_URL });

this.redisClient.on('error', (error) => {
console.log('redis error', error);

if (error) {
this.logger.error('Redis error: ', error);
HawkCatcher.send(error);
Expand Down

0 comments on commit f200a07

Please sign in to comment.