Skip to content

Commit 51c9616

Browse files
committed
fix: clister config
1 parent 2dedd0d commit 51c9616

File tree

6 files changed

+42
-42
lines changed

6 files changed

+42
-42
lines changed

src/cluster.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ export class Cluster {
1212
const cpuCount = this.getCpuCount();
1313

1414
if (cluster.isPrimary) {
15-
this.loggerService.log(`Starting cluster with ${cpuCount} workers...`);
16-
this.loggerService.log(`Master server is running on process ${process.pid}`);
15+
this.loggerService.log(`📑 Starting cluster with ${cpuCount} workers...`);
16+
this.loggerService.log(`📑 Master server is running on process ${process.pid}`);
1717

1818
for (let index = 0; index < cpuCount; index++) {
19-
this.loggerService.log(`Forking process number ${index + 1}...`);
19+
this.loggerService.log(`📑 Forking process number ${index + 1}...`);
2020
cluster.fork();
2121
}
2222

2323
cluster.on("exit", (worker) => {
24-
this.loggerService.warn(`Worker ${worker.id} died. `);
25-
this.loggerService.warn("Starting a new worker...");
24+
this.loggerService.warn(`🚦 Worker ${worker.id} died. `);
25+
this.loggerService.warn("🚦 Starting a new worker...");
2626
cluster.fork();
2727
});
2828
}

src/modules/auth/auth.controller.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export class AuthController {
5050
@Post("login/magic")
5151
@ApiOperation({ summary: "User Login with magic link" })
5252
loginByMagicLink(
53-
@Req() request: Request,
54-
@Res() response: Response,
55-
@Body() dto: MagicLinkLogin,
53+
@Req() request: Request,
54+
@Res() response: Response,
55+
@Body() dto: MagicLinkLogin,
5656
): Observable<void> {
5757
return this.authService.validateUser(false, dto.destination).pipe(
5858
map((_user) => {
@@ -103,9 +103,9 @@ export class AuthController {
103103
@Get("google/callback")
104104
@UseGuards(AuthGuard("google"))
105105
googleAuthRedirect(
106-
@LoggedInUser()
107-
user: OauthResponse,
108-
@Res() response: Response,
106+
@LoggedInUser()
107+
user: OauthResponse,
108+
@Res() response: Response,
109109
) {
110110
return this.authService.login({ email: user.email }, false).pipe(
111111
map((data) => {
@@ -126,9 +126,9 @@ user: OauthResponse,
126126
@Get("facebook/callback")
127127
@UseGuards(AuthGuard("facebook"))
128128
facebookAuthRedirect(
129-
@LoggedInUser()
130-
user: OauthResponse,
131-
@Res() response: Response,
129+
@LoggedInUser()
130+
user: OauthResponse,
131+
@Res() response: Response,
132132
) {
133133
return this.authService.login({ email: user.email }, false).pipe(
134134
map((data) => {
@@ -178,9 +178,9 @@ user: OauthResponse,
178178
@ApiOperation({ summary: "Logout user" })
179179
@Post("logout")
180180
logout(
181-
@LoggedInUser() user: User,
182-
@Query("from_all", new DefaultValuePipe(false), ParseBoolPipe) fromAll: boolean,
183-
@Body() refreshToken?: RefreshTokenDto,
181+
@LoggedInUser() user: User,
182+
@Query("from_all", new DefaultValuePipe(false), ParseBoolPipe) fromAll: boolean,
183+
@Body() refreshToken?: RefreshTokenDto,
184184
): Observable<User> {
185185
return fromAll
186186
? this.authService.logoutFromAll(user)

src/modules/health/health.controller.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ export class HealthController {
3333
() =>
3434
this.http.pingCheck(
3535
"swagger",
36-
`${this.configService.get("app.url", {
37-
infer: true,
38-
})}:${this.configService.get("app.port", { infer: true })}/doc`,
36+
`${this.configService.get("app.url", {
37+
infer: true,
38+
})}:${this.configService.get("app.port", { infer: true })}/doc`,
3939
),
4040
() =>
4141
this.http.pingCheck(
4242
"routes",
43-
`${this.configService.get("app.url", {
44-
infer: true,
45-
})}:${this.configService.get("app.port", {
46-
infer: true,
47-
})}/${this.configService.get("app.prefix", { infer: true })}/health/test`,
43+
`${this.configService.get("app.url", {
44+
infer: true,
45+
})}:${this.configService.get("app.port", {
46+
infer: true,
47+
})}/${this.configService.get("app.prefix", { infer: true })}/health/test`,
4848
),
4949
async () => this.databaseHealth.pingCheck("mikroOrm"),
5050
async () => this.memory.checkHeap("memory_heap", 200 * 1024 * 1024),

src/modules/profile/profile.controller.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export class ProfileController {
3131
params: ["username"],
3232
})
3333
follow(
34-
@LoggedInUser() user: User,
35-
@Param("username") username: string,
34+
@LoggedInUser() user: User,
35+
@Param("username") username: string,
3636
): Observable<ProfileData> {
3737
return this.profileService.follow(user, username);
3838
}
@@ -44,8 +44,8 @@ export class ProfileController {
4444
params: ["username"],
4545
})
4646
unFollow(
47-
@LoggedInUser() user: User,
48-
@Param("username") username: string,
47+
@LoggedInUser() user: User,
48+
@Param("username") username: string,
4949
): Observable<ProfileData> {
5050
return this.profileService.unFollow(user, username);
5151
}

src/modules/twofa/twofa.controller.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export class TwoFactorController {
3232
@Post("authenticate")
3333
@UseGuards(AuthGuard("jwt2fa"))
3434
authenticate(
35-
@LoggedInUser() user: User,
36-
@Body() twoFaAuthDto: TwofaDto,
35+
@LoggedInUser() user: User,
36+
@Body() twoFaAuthDto: TwofaDto,
3737
): Observable<AuthenticationResponse> {
3838
const isCodeValid = this.twoFactorAuthenticationService.isTwoFactorCodeValid(
3939
twoFaAuthDto.code,
@@ -49,8 +49,8 @@ export class TwoFactorController {
4949
@Auth()
5050
@Post("turn-on")
5151
turnOnTwoFactorAuthentication(
52-
@LoggedInUser() user: User,
53-
@Body() dto: TwofaDto,
52+
@LoggedInUser() user: User,
53+
@Body() dto: TwofaDto,
5454
): Observable<User> {
5555
return this.twoFactorAuthenticationService.turnOnTwoFactorAuthentication(dto.code, user);
5656
}

src/modules/user/user.controller.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export class UserController {
3636
})
3737
@ApiFile({ fieldName: "avatar", required: true }) // fix this
3838
publicRegistration(
39-
@Body() dto: UserRegistrationDto,
40-
@UploadedFile(fileValidatorPipe({}))
41-
image: File,
39+
@Body() dto: UserRegistrationDto,
40+
@UploadedFile(fileValidatorPipe({}))
41+
image: File,
4242
): Observable<User> {
4343
return this.userService.create({
4444
...dto,
@@ -66,9 +66,9 @@ image: File,
6666
@CheckPolicies(new GenericPolicyHandler(User, Action.Create))
6767
@ApiFile({ fieldName: "avatar", required: true })
6868
create(
69-
@Body() dto: CreateUserDto,
70-
@UploadedFile(fileValidatorPipe({}))
71-
image: File,
69+
@Body() dto: CreateUserDto,
70+
@UploadedFile(fileValidatorPipe({}))
71+
image: File,
7272
): Observable<User> {
7373
return this.userService.create({ ...dto, files: image });
7474
}
@@ -82,9 +82,9 @@ image: File,
8282
})
8383
@CheckPolicies(new GenericPolicyHandler(User, Action.Update))
8484
update(
85-
@UUIDParam("idx") index: string,
86-
@Body() dto: EditUserDto,
87-
@UploadedFile(fileValidatorPipe({ required: false })) image?: File,
85+
@UUIDParam("idx") index: string,
86+
@Body() dto: EditUserDto,
87+
@UploadedFile(fileValidatorPipe({ required: false })) image?: File,
8888
): Observable<User> {
8989
return this.userService.update(index, dto, image);
9090
}

0 commit comments

Comments
 (0)