xparse-client 0.2.17__py3-none-any.whl → 0.2.18__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.
- xparse_client/pipeline/pipeline.py +8 -0
- {xparse_client-0.2.17.dist-info → xparse_client-0.2.18.dist-info}/METADATA +1 -1
- {xparse_client-0.2.17.dist-info → xparse_client-0.2.18.dist-info}/RECORD +6 -6
- {xparse_client-0.2.17.dist-info → xparse_client-0.2.18.dist-info}/WHEEL +0 -0
- {xparse_client-0.2.17.dist-info → xparse_client-0.2.18.dist-info}/licenses/LICENSE +0 -0
- {xparse_client-0.2.17.dist-info → xparse_client-0.2.18.dist-info}/top_level.txt +0 -0
|
@@ -374,6 +374,14 @@ class Pipeline:
|
|
|
374
374
|
print(f" → 读取文件...")
|
|
375
375
|
file_bytes, data_source = self.source.read_file(file_path)
|
|
376
376
|
data_source = data_source or {}
|
|
377
|
+
|
|
378
|
+
# 检查文件大小,超过 100MB 则报错
|
|
379
|
+
MAX_FILE_SIZE = 100 * 1024 * 1024 # 100MB
|
|
380
|
+
file_size = len(file_bytes)
|
|
381
|
+
if file_size > MAX_FILE_SIZE:
|
|
382
|
+
file_size_mb = file_size / (1024 * 1024)
|
|
383
|
+
raise ValueError(f"文件大小过大: {file_size_mb:.2f}MB,超过100MB限制")
|
|
384
|
+
|
|
377
385
|
# 转换为毫秒时间戳字符串
|
|
378
386
|
timestamp_ms = int(datetime.now(timezone.utc).timestamp() * 1000)
|
|
379
387
|
data_source['date_processed'] = str(timestamp_ms)
|
|
@@ -2,10 +2,10 @@ xparse_client/__init__.py,sha256=C2XLxkCoONl6_B1FmDhWRw84TqOL4pZF20br-K26SSY,172
|
|
|
2
2
|
xparse_client/pipeline/__init__.py,sha256=TVlb2AGCNKP0jrv3p4ZLZCPKp68hTVMFi00DTdi6QAo,49
|
|
3
3
|
xparse_client/pipeline/config.py,sha256=FFYq2a0dBWBEj70s2aInXOiQ5MwwHimd6SI2_tkp52w,4138
|
|
4
4
|
xparse_client/pipeline/destinations.py,sha256=QKlNGcpXIqkZS3rlBlhLDoRqIWA21Jgn3GiGhhfE8Rc,20921
|
|
5
|
-
xparse_client/pipeline/pipeline.py,sha256=
|
|
5
|
+
xparse_client/pipeline/pipeline.py,sha256=XuALq_JkMRzt27sYl55ii3ff7O4H5ywDGeJBvGwdOco,27925
|
|
6
6
|
xparse_client/pipeline/sources.py,sha256=D-kLrSQ-qsFFFq7JC4sL3Y3Q3Q87Wcpv9R5K85YkDjE,22144
|
|
7
|
-
xparse_client-0.2.
|
|
8
|
-
xparse_client-0.2.
|
|
9
|
-
xparse_client-0.2.
|
|
10
|
-
xparse_client-0.2.
|
|
11
|
-
xparse_client-0.2.
|
|
7
|
+
xparse_client-0.2.18.dist-info/licenses/LICENSE,sha256=ckIP-MbocsP9nqYnta5KgfAicYF196B5TNdHIR6kOO0,1075
|
|
8
|
+
xparse_client-0.2.18.dist-info/METADATA,sha256=CIgUGuD_515Wp-j3lrnZrDMhOvDlA-AaoARjUdrSaFY,28824
|
|
9
|
+
xparse_client-0.2.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
xparse_client-0.2.18.dist-info/top_level.txt,sha256=W5PeQwOyfo_Od3d26-gcOtan7rHYk1q3SP1phYedat4,14
|
|
11
|
+
xparse_client-0.2.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|