Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
telecom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
telecom
Commits
3e4ffa3c
Commit
3e4ffa3c
authored
Oct 19, 2018
by
Roque Porchetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_telecom_ingestion: skip default metadata processing on big files
parent
79525b2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
bt5/erp5_wendelin_telecom_ingestion/ExtensionTemplateItem/portal_components/extension.erp5.external_process_raw_data.py
...al_components/extension.erp5.external_process_raw_data.py
+4
-0
bt5/erp5_wendelin_telecom_ingestion/ExtensionTemplateItem/portal_components/extension.erp5.external_process_raw_data.xml
...l_components/extension.erp5.external_process_raw_data.xml
+7
-7
No files found.
bt5/erp5_wendelin_telecom_ingestion/ExtensionTemplateItem/portal_components/extension.erp5.external_process_raw_data.py
View file @
3e4ffa3c
...
...
@@ -11,6 +11,7 @@ from lxml.html import parse
CHUNK_SIZE
=
200000
CHUNK_SIZE_TXT
=
50000
CHUNK_SIZE_CSV
=
25
BIG_FILE
=
5000000000
#5GB
def
saveRawFile
(
data_stream
,
file_name
):
data_stream_chunk
=
None
...
...
@@ -213,6 +214,9 @@ def processRawData(data_stream, data_array, data_descriptor, reference_extension
if
data_stream
.
getSize
()
==
0
:
data_descriptor
.
setTextContent
(
json
.
dumps
(
content
))
return
"Empty Data Stream"
if
data_stream
.
getSize
()
>
BIG_FILE
:
log
(
"Ingested file bigger than 5GB, get metadata process skiped"
)
return
"File bigger than 5GB"
file_name
=
"temporal_file_%s"
%
DateTime
().
strftime
(
'%Y%m%d-%H%M%S'
)
try
:
...
...
bt5/erp5_wendelin_telecom_ingestion/ExtensionTemplateItem/portal_components/extension.erp5.external_process_raw_data.xml
View file @
3e4ffa3c
...
...
@@ -52,13 +52,13 @@
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 7
3
, 2: No exception type(s) specified (bare-except)
</string>
<string>
W: 7
8
, 4: No exception type(s) specified (bare-except)
</string>
<string>
W: 9
4
, 8: Unused variable \'times\' (unused-variable)
</string>
<string>
W:13
0
, 6: No exception type(s) specified (bare-except)
</string>
<string>
W:16
5
, 8: Unreachable code (unreachable)
</string>
<string>
W:18
3
, 11: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
</string>
<string>
W:18
7
, 10: No exception type(s) specified (bare-except)
</string>
<string>
W: 7
4
, 2: No exception type(s) specified (bare-except)
</string>
<string>
W: 7
9
, 4: No exception type(s) specified (bare-except)
</string>
<string>
W: 9
5
, 8: Unused variable \'times\' (unused-variable)
</string>
<string>
W:13
1
, 6: No exception type(s) specified (bare-except)
</string>
<string>
W:16
6
, 8: Unreachable code (unreachable)
</string>
<string>
W:18
4
, 11: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
</string>
<string>
W:18
8
, 10: No exception type(s) specified (bare-except)
</string>
</tuple>
</value>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment