This commit is contained in:
ditiqi 2025-03-02 20:37:58 +08:00
parent c54c49e743
commit 51833be543
5 changed files with 6 additions and 9 deletions

View File

@ -12,6 +12,7 @@ export class VideoProcessor extends BaseProcessor {
super(); super();
} }
async process(resource: Resource): Promise<Resource> { async process(resource: Resource): Promise<Resource> {
console.log('process');
const { url } = resource; const { url } = resource;
const filepath = getUploadFilePath(url); const filepath = getUploadFilePath(url);
this.logger.log( this.logger.log(
@ -114,6 +115,7 @@ export class VideoProcessor extends BaseProcessor {
filepath: string, filepath: string,
outputDir: string, outputDir: string,
): Promise<string> { ): Promise<string> {
console.log('outputDir', outputDir);
const m3u8Path = path.join(outputDir, 'index.m3u8'); const m3u8Path = path.join(outputDir, 'index.m3u8');
this.logger.log( this.logger.log(
`Generating M3U8 stream for video: ${filepath}, Output Dir: ${outputDir}`, `Generating M3U8 stream for video: ${filepath}, Output Dir: ${outputDir}`,

View File

@ -11,9 +11,6 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
const { postId, lectureId, messageId } = args.data; const { postId, lectureId, messageId } = args.data;
const visitorId = args.data?.visitorId || staff?.id; const visitorId = args.data?.visitorId || staff?.id;
let result; let result;
console.log(args.data.type);
console.log(visitorId);
console.log(postId);
const existingVisit = await db.visit.findFirst({ const existingVisit = await db.visit.findFirst({
where: { where: {
type: args.data.type, type: args.data.type,
@ -21,10 +18,8 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
OR: [{ postId }, { messageId }], OR: [{ postId }, { messageId }],
}, },
}); });
console.log('result', existingVisit);
if (!existingVisit) { if (!existingVisit) {
result = await super.create(args); result = await super.create(args);
console.log('createdResult', result);
} else if (args.data.type === VisitType.READED) { } else if (args.data.type === VisitType.READED) {
result = await super.update({ result = await super.update({
where: { id: existingVisit.id }, where: { id: existingVisit.id },

View File

@ -128,7 +128,7 @@ export class TusService implements OnModuleInit {
} }
async handleTus(req: Request, res: Response) { async handleTus(req: Request, res: Response) {
console.log(req) // console.log(req)
return this.tusServer.handle(req, res); return this.tusServer.handle(req, res);
} }
} }

View File

@ -100,7 +100,7 @@ server {
# 仅供内部使用 # 仅供内部使用
internal; internal;
# 代理到认证服务 # 代理到认证服务
proxy_pass http://host.docker.internal:3000/auth/file; proxy_pass http://host.docker.internal:3006/auth/file;
# 请求优化:不传递请求体 # 请求优化:不传递请求体
proxy_pass_request_body off; proxy_pass_request_body off;

View File

@ -7,8 +7,8 @@
<script> <script>
window.env = { window.env = {
VITE_APP_SERVER_IP: "192.168.139.239", VITE_APP_SERVER_IP: "192.168.139.239",
VITE_APP_SERVER_PORT: "3000", VITE_APP_SERVER_PORT: "3006",
VITE_APP_FILE_PORT: "80", VITE_APP_FILE_PORT: "8092",
VITE_APP_VERSION: "0.3.0", VITE_APP_VERSION: "0.3.0",
VITE_APP_APP_NAME: "烽火慕课", VITE_APP_APP_NAME: "烽火慕课",
}; };