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
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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 @@
...
@@ -56,6 +56,12 @@
Simply a wrapper to real method.\n
Simply a wrapper to real method.\n
"""\n
"""\n
data_stream = context.restrictedTraverse(data_stream_relative_url)\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
data_stream_chunk_list = data_stream.readChunkList(start, end)\n
\n
\n
# do call transformation script\n
# do call transformation script\n
...
@@ -68,26 +74,26 @@ if transform_script_id is not None:\n
...
@@ -68,26 +74,26 @@ if transform_script_id is not None:\n
data_array_reference)\n
data_array_reference)\n
\n
\n
# [warning] store current position offset in Data Stream, this can cause easily \n
# [warning] store current position offset in Data Stream, this can cause easily \n
# ConflictErrors and it spawns re-index activities on DataStream\n
# ConflictErrors and it spawns re-index activities on DataStream. Thus \n
data_stream.setOffset(end)\n
# disable for now.\n
#data_stream.setOffset(end)\n
\n
\n
# start another read in another activity\n
# start another read in another activity\n
start += chunk_length\n
start += chunk_length\n
end += chunk_length\n
end += chunk_length\n
total_stream_length = data_stream.getSize()\n
\n
\n
if end > total_stream_length:\n
if end > total_stream_length:\n
# no read beyond end of stream\n
# no read beyond end of stream\n
end = total_stream_length\n
end = total_stream_length\n
\n
\n
if start
< total_stream_length:
\n
# some bytes left ...\n
#
some
bytes
left
...\n
data_stream.activate().DataStream_readChunkListAndTransform( \\\n
data_stream.activate().DataStream_readChunkListAndTransform(
\\\n
data_stream.getRelativeUrl(), \\\n
data_stream.getRelativeUrl(), \\\n
start, \\\n
start, \\\n
end, \\\n
end, \\\n
chunk_length, \\\n
chunk_length, \\\n
transform_script_id)\n
transform_script_id,\n
data_array_reference)\n
]]>
</string>
</value>
]]>
</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