Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Nov 4, 2024
1 parent ab0c1fc commit 9b7eece
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/backend/src/boot/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ if (cluster.isPrimary && !envOption.disableClustering) {
});

process.on('SIGINT', () => {
logger.warn(chalk.yellow('Process received SIGINT'));
coreLogger.warn(chalk.yellow('Process received SIGINT'));
isShuttingDown = true;
});

process.on('SIGTERM', () => {
logger.warn(chalk.yellow('Process received SIGTERM'));
coreLogger.warn(chalk.yellow('Process received SIGTERM'));
isShuttingDown = true;
});
}
Expand All @@ -70,18 +70,18 @@ if (!envOption.quiet) {
// Display detail of uncaught exception
process.on('uncaughtException', err => {
try {
logger.error(`Uncaught exception: ${err.message}`, { error: err });
coreLogger.error(`Uncaught exception: ${err.message}`, { error: err });
} catch { }
});

// Dying away...
process.on('exit', code => {
logger.warn(chalk.yellow(`The process is going to exit with code ${code}`));
coreLogger.warn(chalk.yellow(`The process is going to exit with code ${code}`));
});

process.on('warning', warning => {
if ((warning as never)['code'] !== 'MISSKEY_SHUTDOWN') return;
logger.warn(chalk.yellow(`${warning.message}: ${(warning as never)['detail']}`));
coreLogger.warn(chalk.yellow(`${warning.message}: ${(warning as never)['detail']}`));
for (const id in cluster.workers) cluster.workers[id]?.process.kill('SIGTERM');
process.exit();
});
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/UserFollowingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class UserFollowingService implements OnModuleInit {
followeeSharedInbox: this.userEntityService.isRemoteUser(followee) ? followee.sharedInbox : null,
}).catch(err => {
if (isDuplicateKeyValueError(err) && this.userEntityService.isRemoteUser(follower) && this.userEntityService.isLocalUser(followee)) {
logger.info(`Insert duplicated ignore. ${follower.id} => ${followee.id}`);
this.logger.info(`Insert duplicated ignore. ${follower.id} => ${followee.id}`);
alreadyFollowed = true;
} else {
throw err;
Expand Down Expand Up @@ -380,7 +380,7 @@ export class UserFollowingService implements OnModuleInit {
});

if (following === null || !following.follower || !following.followee) {
logger.warn('フォロー解除がリクエストされましたがフォローしていませんでした');
this.logger.warn('フォロー解除がリクエストされましたがフォローしていませんでした');
return;
}

Expand Down

0 comments on commit 9b7eece

Please sign in to comment.