Commit d034c626 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Adjust priority and defaults of disaster recovery

  Priority is set to avoid large accumulation of activities to be queued.
parent 649e3d00
...@@ -9,7 +9,7 @@ result_count = len(document_list) ...@@ -9,7 +9,7 @@ result_count = len(document_list)
if result_count: if result_count:
if result_count == limit: if result_count == limit:
portal.portal_activities.activate(activity='SQLQueue').ERP5Site_checkDeletedDocumentList(document_list[-1].uid, limit, packet_size) portal.portal_activities.activate(activity='SQLQueue', priority=3).ERP5Site_checkDeletedDocumentList(document_list[-1].uid, limit, packet_size)
column_list = [(x.path, x.uid) for x in document_list] column_list = [(x.path, x.uid) for x in document_list]
for i in xrange(0, result_count, packet_size): for i in xrange(0, result_count, packet_size):
......
...@@ -12,7 +12,7 @@ result_count = len(document_list) ...@@ -12,7 +12,7 @@ result_count = len(document_list)
if result_count: if result_count:
if result_count == limit: if result_count == limit:
portal.portal_activities.activate(activity='SQLQueue').ERP5Site_checkLatestModifiedDocumentList(document_list[-1].uid, limit, packet_size, before, now) portal.portal_activities.activate(activity='SQLQueue', priority=3).ERP5Site_checkLatestModifiedDocumentList(document_list[-1].uid, limit, packet_size, before, now)
column_list = [(x.path, x.uid) for x in document_list] column_list = [(x.path, x.uid) for x in document_list]
for i in xrange(0, result_count, packet_size): for i in xrange(0, result_count, packet_size):
......
portal = context.getPortalObject() portal = context.getPortalObject()
now = DateTime() now = DateTime()
before = now - int(7) before = now - int(days_before)
strfstring = '%Y-%m-%d %H:%M:%S' strfstring = '%Y-%m-%d %H:%M:%S'
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>optimistic=True</string> </value> <value> <string>optimistic=True, days_before=1</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
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