mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
fix(printer): increase timeout to 15s
This commit is contained in:
@ -7,8 +7,8 @@ export const configSchema = z.object({
|
||||
PORT: z.coerce.number().default(3000),
|
||||
|
||||
// Client Port & URL (only for development environments)
|
||||
__DEV__CLIENT_PORT: z.coerce.number().default(5173),
|
||||
__DEV__CLIENT_URL: z.string().url().default("http://localhost:5173"),
|
||||
__DEV__CLIENT_PORT: z.coerce.number().optional(),
|
||||
__DEV__CLIENT_URL: z.string().url().optional(),
|
||||
|
||||
// URLs
|
||||
PUBLIC_URL: z.string().url(),
|
||||
|
||||
@ -14,7 +14,7 @@ import { Config } from "../config/schema";
|
||||
import { StorageService } from "../storage/storage.service";
|
||||
import { UtilsService } from "../utils/utils.service";
|
||||
|
||||
const PRINTER_TIMEOUT = 10000; // 10 seconds
|
||||
const PRINTER_TIMEOUT = 15000; // 15 seconds
|
||||
|
||||
@Injectable()
|
||||
export class PrinterService {
|
||||
@ -76,9 +76,7 @@ export class PrinterService {
|
||||
async printPreview(resume: ResumeDto) {
|
||||
return this.utils.getCachedOrSet(
|
||||
`user:${resume.userId}:storage:previews:${resume.id}`,
|
||||
async () => {
|
||||
return withTimeout(this.generatePreview(resume), PRINTER_TIMEOUT);
|
||||
},
|
||||
async () => withTimeout(this.generatePreview(resume), PRINTER_TIMEOUT),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ export class TranslationService {
|
||||
) {}
|
||||
|
||||
async fetchLanguages() {
|
||||
const isDevelopment = this.configService.get("NODE_ENV") === "development";
|
||||
|
||||
try {
|
||||
const projectId = this.configService.getOrThrow("CROWDIN_PROJECT_ID");
|
||||
const accessToken = this.configService.getOrThrow("CROWDIN_ACCESS_TOKEN");
|
||||
@ -34,6 +32,7 @@ export class TranslationService {
|
||||
);
|
||||
const { data } = response.data as CrowdinResponse;
|
||||
|
||||
// Add English Locale
|
||||
data.push({
|
||||
data: {
|
||||
language: {
|
||||
@ -46,19 +45,18 @@ export class TranslationService {
|
||||
},
|
||||
});
|
||||
|
||||
if (isDevelopment) {
|
||||
data.push({
|
||||
data: {
|
||||
language: {
|
||||
id: "zu-ZA",
|
||||
locale: "zu-ZA",
|
||||
editorCode: "zuza",
|
||||
name: "Psuedo Locale",
|
||||
},
|
||||
translationProgress: 100,
|
||||
// Add Pseudo Locale
|
||||
data.push({
|
||||
data: {
|
||||
language: {
|
||||
id: "zu-ZA",
|
||||
locale: "zu-ZA",
|
||||
editorCode: "zuza",
|
||||
name: "Psuedo Locale",
|
||||
},
|
||||
});
|
||||
}
|
||||
translationProgress: 100,
|
||||
},
|
||||
});
|
||||
|
||||
return data.map(({ data }) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user