fix: count only the files the current import brought - #154
Merged
Merged
Conversation
An import that was interrupted hard leaves nb_imported_files behind, and the number of imported files reported when the next one finishes was added on top of it. The size counter next to it was already reset at the start. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
A file the target folder refuses to answer for is counted as a file that could not be downloaded, and the notification reporting it says to check the server logs, where nothing was written about it. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
The stub sits in the app directory, so a web server could be asked to run it. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small fixes from re-reading #144 before it was merged.
Only the current import is counted
The finish path resets
nb_imported_files, cancelling an import does not, and an import that starts adds to whatever is there. Cancelling in the "Data migration" settings section writesimporting_onedrive,last_onedrive_import_timestampandimported_size, so the counter of imported files survives, and the next import reads it as its baseline and reports the sum when it finishes.imported_sizeright next to it was already reset at the start; this counter was not. The same applies to a job that is killed.A file that cannot be looked up says so in the log
A file the target folder refuses to answer for is counted as a file that could not be downloaded, and the notification reporting it says to check the server logs, where nothing was written about it.
The Graph stub answers a development server only
tests/integration/graph-stub.phpis a php file inside the app directory, so a web server can be asked to run it. It serves nothing but a fake drive, and now only as the router of aphp -Sdevelopment server.