3v324v23 commited on
Commit
e3725d2
·
1 Parent(s): 6bb2fbe

fix: mock missing queue service and fix tsconfig paths for build

Browse files
Files changed (3) hide show
  1. .gitattributes +3 -0
  2. api/lib/queue.ts +15 -0
  3. tsconfig.json +6 -0
.gitattributes ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Hugging Face Spaces Git Attributes
2
+ * text=auto
3
+ *.lfsconfig filter=lfs diff=lfs merge=lfs -text
api/lib/queue.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * 模拟任务队列处理器 (由于原项目缺少 queue.ts,此处提供 Mock 以保证运行)
3
+ */
4
+
5
+ export const setupWorkers = (
6
+ aiHandler: (job: any) => Promise<void>,
7
+ docHandler: (job: any) => Promise<void>
8
+ ) => {
9
+ console.log('[Queue Mock] 任务处理器已初始化 (模拟模式)');
10
+ // 在这里可以添加简单的模拟任务触发逻辑,或者保持静默
11
+ };
12
+
13
+ export const addJob = async (type: string, data: any) => {
14
+ console.log(`[Queue Mock] 添加任务: ${type}`, data);
15
+ };
tsconfig.json CHANGED
@@ -26,6 +26,12 @@
26
  "paths": {
27
  "@/*": [
28
  "./src/*"
 
 
 
 
 
 
29
  ]
30
  },
31
  "types": [
 
26
  "paths": {
27
  "@/*": [
28
  "./src/*"
29
+ ],
30
+ "@shared/*": [
31
+ "./shared/*"
32
+ ],
33
+ "@shared": [
34
+ "./shared"
35
  ]
36
  },
37
  "types": [