Batch operation by priority for offline folders

This commit is contained in:
M66B 2020-01-27 13:28:55 +01:00
parent 7183255de8
commit 275ebf751d
1 changed files with 6 additions and 3 deletions

View File

@ -48,6 +48,12 @@ public class TupleOperationEx extends EntityOperation {
PartitionKey getPartitionKey(boolean offline) {
PartitionKey key = new PartitionKey();
if (offline) {
// open/close folder is expensive
key.priority = this.priority + 10;
return key;
}
if (FETCH.equals(name))
try {
JSONArray jargs = new JSONArray(args);
@ -62,9 +68,6 @@ public class TupleOperationEx extends EntityOperation {
key.priority = this.priority;
key.operation = this.name;
if (offline)
key.priority += 10;
return key;
}