Refactor API and worker applications to streamline middleware imports and remove unused Redis dependency. Update TypeScript build information across packages to reflect recent changes in file structure and dependencies.
This commit is contained in:
1
.turbo/cache/6813c22c38adfa16-manifest.json
vendored
Normal file
1
.turbo/cache/6813c22c38adfa16-manifest.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"files":{"packages/config/.turbo/turbo-build.log":{"size":105,"mtime_nanos":1782463939682363800,"mode":420,"is_dir":false},"packages/config/dist/index.d.ts":{"size":1874,"mtime_nanos":1782463696518849500,"mode":420,"is_dir":false},"packages/config/dist":{"size":0,"mtime_nanos":0,"mode":0,"is_dir":true},"packages/config/dist/index.d.ts.map":{"size":521,"mtime_nanos":1782463901632066900,"mode":420,"is_dir":false},"packages/config/dist/index.js":{"size":3043,"mtime_nanos":1782463901598335900,"mode":420,"is_dir":false},"packages/config/dist/index.js.map":{"size":3214,"mtime_nanos":1782463901597337500,"mode":420,"is_dir":false}},"order":["packages/config/.turbo/turbo-build.log","packages/config/dist","packages/config/dist/index.d.ts","packages/config/dist/index.d.ts.map","packages/config/dist/index.js","packages/config/dist/index.js.map"]}
|
||||||
1
.turbo/cache/6813c22c38adfa16-meta.json
vendored
Normal file
1
.turbo/cache/6813c22c38adfa16-meta.json
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"hash":"6813c22c38adfa16","duration":2402,"sha":"9e1c7840d14a37920dac1d5ca9934f4fddc85e76","dirty_hash":"8c732d99cefda238a252bc8656e539af9c3de73301c271e1c50cbe7efbf505f4"}
|
||||||
BIN
.turbo/cache/6813c22c38adfa16.tar.zst
vendored
Normal file
BIN
.turbo/cache/6813c22c38adfa16.tar.zst
vendored
Normal file
Binary file not shown.
@@ -23,16 +23,6 @@ import { LoggerModule } from 'nestjs-pino';
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
serializers: {
|
|
||||||
req: (req: { id?: string; method?: string; url?: string }) => ({
|
|
||||||
id: req.id,
|
|
||||||
method: req.method,
|
|
||||||
url: req.url,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
customProps: (req: { id?: string }) => ({
|
|
||||||
requestId: req.id,
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
ThrottlerModule.forRoot([
|
ThrottlerModule.forRoot([
|
||||||
|
|||||||
1
apps/api/tsconfig.build.tsbuildinfo
Normal file
1
apps/api/tsconfig.build.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
import { getApiUrl } from "./env";
|
import { getApiUrl } from "../env";
|
||||||
|
|
||||||
export interface AuthCredentials {
|
export interface AuthCredentials {
|
||||||
email: string;
|
email: string;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import createMiddleware from "next-intl/middleware";
|
import createMiddleware from "next-intl/middleware";
|
||||||
import { routing } from "./src/i18n/routing";
|
import { routing } from "./i18n/routing";
|
||||||
|
|
||||||
export default createMiddleware(routing);
|
export default createMiddleware(routing);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -15,7 +15,6 @@
|
|||||||
"@hexahost/config": "workspace:*",
|
"@hexahost/config": "workspace:*",
|
||||||
"@hexahost/database": "workspace:*",
|
"@hexahost/database": "workspace:*",
|
||||||
"bullmq": "^5.34.10",
|
"bullmq": "^5.34.10",
|
||||||
"ioredis": "^5.4.2",
|
|
||||||
"pino": "^9.6.0"
|
"pino": "^9.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Job, Worker, type ConnectionOptions } from 'bullmq';
|
import { Job, Worker, type ConnectionOptions } from 'bullmq';
|
||||||
import IORedis from 'ioredis';
|
|
||||||
|
|
||||||
import { validateConfig } from '@hexahost/config';
|
import { validateConfig } from '@hexahost/config';
|
||||||
import { prisma } from '@hexahost/database';
|
import { prisma } from '@hexahost/database';
|
||||||
@@ -8,12 +7,6 @@ import { startHealthServer } from './health';
|
|||||||
import { logger } from './logger';
|
import { logger } from './logger';
|
||||||
import { WORKER_QUEUES, type WorkerQueueName } from './queues';
|
import { WORKER_QUEUES, type WorkerQueueName } from './queues';
|
||||||
|
|
||||||
function createRedisConnection(redisUrl: string): IORedis {
|
|
||||||
return new IORedis(redisUrl, {
|
|
||||||
maxRetriesPerRequest: null,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function createQueueWorker(
|
function createQueueWorker(
|
||||||
queueName: WorkerQueueName,
|
queueName: WorkerQueueName,
|
||||||
connection: ConnectionOptions,
|
connection: ConnectionOptions,
|
||||||
@@ -36,9 +29,13 @@ async function bootstrap(): Promise<void> {
|
|||||||
const config = validateConfig();
|
const config = validateConfig();
|
||||||
|
|
||||||
const healthServer = startHealthServer();
|
const healthServer = startHealthServer();
|
||||||
const redis = createRedisConnection(config.REDIS_URL);
|
const connection: ConnectionOptions = {
|
||||||
|
url: config.REDIS_URL,
|
||||||
|
maxRetriesPerRequest: null,
|
||||||
|
};
|
||||||
|
|
||||||
const workers = WORKER_QUEUES.map((queueName) =>
|
const workers = WORKER_QUEUES.map((queueName) =>
|
||||||
createQueueWorker(queueName, redis),
|
createQueueWorker(queueName, connection),
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const worker of workers) {
|
for (const worker of workers) {
|
||||||
@@ -60,7 +57,6 @@ async function bootstrap(): Promise<void> {
|
|||||||
logger.info({ signal }, 'Shutting down worker');
|
logger.info({ signal }, 'Shutting down worker');
|
||||||
|
|
||||||
await Promise.all(workers.map((worker) => worker.close()));
|
await Promise.all(workers.map((worker) => worker.close()));
|
||||||
await redis.quit();
|
|
||||||
await prisma.$disconnect();
|
await prisma.$disconnect();
|
||||||
|
|
||||||
healthServer.close(() => {
|
healthServer.close(() => {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user