mirror of https://github.com/M66B/FairEmail.git
Added logging
This commit is contained in:
parent
7c4f6b5803
commit
8c7bbd77e1
|
@ -190,7 +190,7 @@ class Core {
|
|||
|
||||
int retry = 0;
|
||||
boolean group = true;
|
||||
Log.i(folder.name + " executing operations=" + ops.size());
|
||||
Log.i(folder.name + " executing sequence=" + sequence + " operations=" + ops.size());
|
||||
while (retry < LOCAL_RETRY_MAX && ops.size() > 0 &&
|
||||
state.isRunning() &&
|
||||
state.batchCanRun(folder.id, priority, sequence)) {
|
||||
|
@ -679,6 +679,12 @@ class Core {
|
|||
else {
|
||||
if (state.batchCanRun(folder.id, priority, sequence))
|
||||
state.error(new OperationCanceledException("Processing"));
|
||||
else {
|
||||
if (state.isProcessing())
|
||||
Log.e(folder.name + " cannot run " +
|
||||
" sequence=" + sequence +
|
||||
" batch=" + state.getBatch(folder.id, priority));
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
Log.i(folder.name + " end process state=" + state + " pending=" + ops.size());
|
||||
|
@ -5359,6 +5365,17 @@ class Core {
|
|||
}
|
||||
}
|
||||
|
||||
boolean isProcessing() {
|
||||
return process;
|
||||
}
|
||||
|
||||
Long getBatch(long folder, int priority) {
|
||||
synchronized (this) {
|
||||
FolderPriority key = new FolderPriority(folder, priority);
|
||||
return batch.get(key);
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -460,7 +460,8 @@ public class EntityOperation {
|
|||
break;
|
||||
}
|
||||
|
||||
db.operation().deleteOperation(fid, SYNC);
|
||||
int count = db.operation().deleteOperation(fid, SYNC);
|
||||
Log.i("Deleted stale sync=" + count);
|
||||
sync(context, fid, false, force);
|
||||
}
|
||||
|
||||
|
|
|
@ -1878,6 +1878,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
|
||||
Log.i(folder.name +
|
||||
" executing partition=" + key +
|
||||
" sequence=" + sequence +
|
||||
" operations=" + partition.size());
|
||||
|
||||
// Get folder
|
||||
|
|
Loading…
Reference in New Issue