Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matevz Golob
wendelin
Commits
e9e24e46
Commit
e9e24e46
authored
Jun 02, 2015
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always pass destination array reference.
Better end condition.
parent
bc825ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataStream_readChunkListAndTransform.xml
...ns/erp5_wendelin/DataStream_readChunkListAndTransform.xml
+13
-7
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataStream_readChunkListAndTransform.xml
View file @
e9e24e46
...
...
@@ -56,6 +56,12 @@
Simply a wrapper to real method.\n
"""\n
data_stream = context.restrictedTraverse(data_stream_relative_url)\n
total_stream_length = data_stream.getSize()\n
\n
if start >
total_stream_length:\n
# end reached\n
return\n
\n
data_stream_chunk_list = data_stream.readChunkList(start, end)\n
\n
# do call transformation script\n
...
...
@@ -68,26 +74,26 @@ if transform_script_id is not None:\n
data_array_reference)\n
\n
# [warning] store current position offset in Data Stream, this can cause easily \n
# ConflictErrors and it spawns re-index activities on DataStream\n
data_stream.setOffset(end)\n
# ConflictErrors and it spawns re-index activities on DataStream. Thus \n
# disable for now.\n
#data_stream.setOffset(end)\n
\n
# start another read in another activity\n
start += chunk_length\n
end += chunk_length\n
total_stream_length = data_stream.getSize()\n
\n
if end > total_stream_length:\n
# no read beyond end of stream\n
end = total_stream_length\n
\n
if start
< total_stream_length:
\n
#
some
bytes
left
...\n
data_stream.activate().DataStream_readChunkListAndTransform(
\\\n
# some bytes left ...\n
data_stream.activate().DataStream_readChunkListAndTransform( \\\n
data_stream.getRelativeUrl(), \\\n
start, \\\n
end, \\\n
chunk_length, \\\n
transform_script_id)\n
transform_script_id,\n
data_array_reference)\n
]]>
</string>
</value>
...
...
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