Commit c47843ab authored by Vincent Bechu's avatar Vincent Bechu Committed by Eteri

erp5_officejs: limit document amount for erp5 synchronization

parent 9883add2
...@@ -19,18 +19,13 @@ ...@@ -19,18 +19,13 @@
portal_type = result[0], portal_type = result[0],
attachment_synchro = result[1] !== undefined, attachment_synchro = result[1] !== undefined,
extended_attachment_url = result[1]; extended_attachment_url = result[1];
// We are looking for documents modified in the past 3 month
old_date = new Date(old_date.getFullYear(), old_date.getMonth(), old_date.getDate() - 15);
configuration = { configuration = {
type: "replicate", type: "replicate",
// XXX This drop the signature lists... // XXX This drop the signature lists...
query: { query: {
query: 'portal_type:"' + portal_type query: 'portal_type:"' + portal_type + '"',
// XX Synchonizing the whole module is too much, here is a way to start quietly limit: [0, 30],
// Supsended until modification_date is handled for synchronization sort_on: [["modification_date", "descending"]]
+ '" AND modification_date:>="'
+ old_date.toISOString() + '" ',
limit: [0, 1234567890]
}, },
use_remote_post: true, use_remote_post: true,
conflict_handling: 1, conflict_handling: 1,
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>957.15138.20000.4881</string> </value> <value> <string>958.61732.51927.19012</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1486741091.54</float> <float>1493209251.12</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment