pydatamax 0.1.16__py3-none-any.whl → 0.1.16.post1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datamax/utils/uno_handler.py +17 -6
- {pydatamax-0.1.16.dist-info → pydatamax-0.1.16.post1.dist-info}/METADATA +1 -1
- {pydatamax-0.1.16.dist-info → pydatamax-0.1.16.post1.dist-info}/RECORD +6 -6
- {pydatamax-0.1.16.dist-info → pydatamax-0.1.16.post1.dist-info}/WHEEL +0 -0
- {pydatamax-0.1.16.dist-info → pydatamax-0.1.16.post1.dist-info}/licenses/LICENSE +0 -0
- {pydatamax-0.1.16.dist-info → pydatamax-0.1.16.post1.dist-info}/top_level.txt +0 -0
datamax/utils/uno_handler.py
CHANGED
@@ -125,12 +125,23 @@ class UnoManager:
|
|
125
125
|
cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
|
126
126
|
)
|
127
127
|
logger.info(f"⏳ 等待LibreOffice服务启动...")
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
128
|
+
|
129
|
+
# 智能等待:轮询检查服务状态,给不同性能机器弹性时间
|
130
|
+
start_time = time.time()
|
131
|
+
check_interval = 1 # 每1秒检查一次
|
132
|
+
max_wait_time = 30 # 最大等待30秒
|
133
|
+
|
134
|
+
while time.time() - start_time < max_wait_time:
|
135
|
+
if self._check_soffice_running():
|
136
|
+
elapsed = time.time() - start_time
|
137
|
+
logger.info(f"✅ LibreOffice服务启动成功 (耗时 {elapsed:.1f}秒)")
|
138
|
+
return
|
139
|
+
|
140
|
+
logger.debug(f"🔄 服务未就绪,继续等待... (已等待 {time.time() - start_time:.1f}秒)")
|
141
|
+
time.sleep(check_interval)
|
142
|
+
|
143
|
+
# 超时仍未启动
|
144
|
+
raise Exception(f"LibreOffice服务启动超时 (等待了{max_wait_time}秒)")
|
134
145
|
|
135
146
|
except Exception as e:
|
136
147
|
logger.error(f"❌ 启动LibreOffice服务失败: {str(e)}")
|
@@ -30,9 +30,9 @@ datamax/utils/paddleocr_pdf_operator.py,sha256=SW06dts1SxDnUvyf5zWYpAN_6t9PLtJXU
|
|
30
30
|
datamax/utils/ppt_extract.py,sha256=jBVGYEsBGPjHqyq7drHTOM8MnFOwqKyHhbkKmEAryAk,6307
|
31
31
|
datamax/utils/qa_generator.py,sha256=pXxdFm_EnWgMuilfmLKgy2c6NDexQZN8nWxT-bYBt74,12548
|
32
32
|
datamax/utils/tokenizer.py,sha256=o78GPmeJ3vs3-SF0b2nMm35XtbrCKbrhDW0gI9gqGl4,880
|
33
|
-
datamax/utils/uno_handler.py,sha256=
|
34
|
-
pydatamax-0.1.16.dist-info/licenses/LICENSE,sha256=RltoeMa9c1956S08ThvZE2yJSPbnem68Y8cmiIfOgco,1088
|
35
|
-
pydatamax-0.1.16.dist-info/METADATA,sha256=
|
36
|
-
pydatamax-0.1.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
37
|
-
pydatamax-0.1.16.dist-info/top_level.txt,sha256=N9TrwI3GKnWW07RRXHr0xX5Bm8dIM_sahfAnf9j8J9M,8
|
38
|
-
pydatamax-0.1.16.dist-info/RECORD,,
|
33
|
+
datamax/utils/uno_handler.py,sha256=ehUyk3I8dxMzjK8IzNO5nKcmc-t97ERMUqmSbYPeABc,15435
|
34
|
+
pydatamax-0.1.16.post1.dist-info/licenses/LICENSE,sha256=RltoeMa9c1956S08ThvZE2yJSPbnem68Y8cmiIfOgco,1088
|
35
|
+
pydatamax-0.1.16.post1.dist-info/METADATA,sha256=6I4bYRn8noQbBVURScRDut0fFksMDiU3wAXSNgpavDg,9801
|
36
|
+
pydatamax-0.1.16.post1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
37
|
+
pydatamax-0.1.16.post1.dist-info/top_level.txt,sha256=N9TrwI3GKnWW07RRXHr0xX5Bm8dIM_sahfAnf9j8J9M,8
|
38
|
+
pydatamax-0.1.16.post1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|