Skip to content

Commit

Permalink
upd prod
Browse files Browse the repository at this point in the history
  • Loading branch information
neSpecc committed Jan 31, 2025
2 parents ae3798c + 0e72860 commit 11255e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
14 changes: 1 addition & 13 deletions runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ if (process.env.HAWK_CATCHER_TOKEN) {
HawkCatcher.init(process.env.HAWK_CATCHER_TOKEN);
}

console.log('process.env', process.env);

type WorkerConstructor = new () => Worker;

const BEGINNING_OF_ARGS = 2;
Expand All @@ -29,8 +27,6 @@ const BEGINNING_OF_ARGS = 2;
*/
const workerNames = process.argv.slice(BEGINNING_OF_ARGS);

console.log('workerNames', workerNames);

/**
* Workers dispatcher.
* Load, run and finish workers.
Expand Down Expand Up @@ -59,8 +55,6 @@ class WorkerRunner {
*/
this.loadPackages()
.then((workerConstructors) => {
console.log('packages loaded');

this.constructWorkers(workerConstructors);
})
// .then(() => {
Expand Down Expand Up @@ -171,12 +165,8 @@ class WorkerRunner {
* @param workerConstructors - worker constructors to create new instances
*/
private constructWorkers(workerConstructors: WorkerConstructor[]): void {
console.log('constructWorkers', workerConstructors);

return workerConstructors.forEach((WorkerClass) => {
try {
console.log('constructing worker', WorkerClass);

const worker = new WorkerClass();

this.workers.push(worker);
Expand Down Expand Up @@ -312,10 +302,8 @@ class WorkerRunner {
}
}

console.log('Starting worker runner');

// eslint-disable-next-line no-new
try {
// eslint-disable-next-line no-new
new WorkerRunner();
} catch (error) {
console.error('Error running worker runner', error);
Expand Down
6 changes: 1 addition & 5 deletions workers/grouper/src/redisHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ export default class RedisHelper {
*/
constructor() {
try {
console.log('redis constructor', process.env.REDIS_URL);


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 11255e9

Please sign in to comment.