Update PR

* Update PR
This commit is contained in:
abraunegg 2023-09-03 15:05:01 +10:00
parent 54b3d52703
commit c659cb2040
2 changed files with 16 additions and 20 deletions

View file

@ -406,8 +406,8 @@ final class Monitor {
remove(path); remove(path);
cookieToPath.remove(cookie); cookieToPath.remove(cookie);
} }
// Debug Log that all inotify events are flushed
log.log("inotify events flushed"); log.vdebug("inotify events flushed");
} }
} }
} }

View file

@ -5371,8 +5371,10 @@ class SyncEngine {
Thread.sleep(dur!"seconds"(30)); Thread.sleep(dur!"seconds"(30));
} }
// re-try original request - retried for 429, 503, 504 - but loop back calling this function // re-try original request - retried for 429, 503, 504 - but loop back calling this function
log.vdebug("Retrying Function: ", thisFunctionName); log.log("Retrying Query: rootData = generateDeltaResponseOneDriveApiInstance.getDriveIdRoot(searchItem.driveId)");
generateDeltaResponse(pathToQuery); rootData = generateDeltaResponseOneDriveApiInstance.getDriveIdRoot(searchItem.driveId);
} else { } else {
// Default operation if not 408,429,503,504 errors // Default operation if not 408,429,503,504 errors
// display what the error is // display what the error is
@ -5634,24 +5636,17 @@ class SyncEngine {
string nextLink; string nextLink;
for (;;) { for (;;) {
// query children // query this level children
try { try {
thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink); thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink);
} catch (OneDriveException exception) { } catch (OneDriveException exception) {
writeln("CODING TO DO: EXCEPTION HANDLING NEEDED: thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink)");
writeln("EXCEPTION HANDLING NEEDED: thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink)");
} }
// Was a valid JSON response for 'thisLevelChildren' provided? // Was a valid JSON response for 'thisLevelChildren' provided?
if (thisLevelChildren.type() == JSONType.object) { if (thisLevelChildren.type() == JSONType.object) {
// process this level children // process this level children
if (!childParentPath.empty) { if (!childParentPath.empty) {
// We dont use childParentPath to log, as this poses an information leak risk. // We dont use childParentPath to log, as this poses an information leak risk.
@ -5695,13 +5690,14 @@ class SyncEngine {
} else break; } else break;
} else { } else {
// Invalid JSON response when querying this level children
// driveData is an invalid JSON object log.vdebug("INVALID JSON response when attempting a retry of parent function - queryForChildren(driveId, idToQuery, childParentPath, pathForLogging)");
writeln("CODING TO DO: The query of OneDrive API to thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink) generated an invalid JSON response - thus we cant build our own /delta simulated response ... how to handle?"); // retry thisLevelChildren = queryThisLevelChildren
// Must exit here log.vdebug("Thread sleeping for an additional 30 seconds");
exit(-1); Thread.sleep(dur!"seconds"(30));
log.vdebug("Retry this call thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink)");
thisLevelChildren = queryThisLevelChildren(driveId, idToQuery, nextLink);
} }
} }
// return response // return response