-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Now create destination folders before saving files #973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jump to bottom
8000
Merged
Conversation
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
af792c8
to
a04d682
Compare
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
Crash--
reviewed
Nov 13, 2023
3932774
to
e35e219
Compare
e35e219
to
9407d68
Compare
This avoids many requests to the stack for each imported files and saves a lot of time If the destination folder was removed, throw a specific error to let the flagship app handle the situation (recreate the destination folder, update the trigger with folder_to_save, etc)
- postProcess has never been used in clisk konnectors and there are another mean to modify the content of files : downloadFileInWorker - entry.fetchFile comes from node konnectors and this is exactyly the role of downloadFileInWorker
9407d68
to
ee45891
Compare
doubleface
pushed a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 23, 2023
When this even occurs, it means that the main destination folder of the konnector has been removed during konnector execution. In this case, we : - Regenerate the files index - create the destination folder according to the manifest - update the trigger with the new message.folder_to_save attribute - retry saveFiles see konnectors/libs#973
6 tasks
doubleface
pushed a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 23, 2023
When this even occurs, it means that the main destination folder of the konnector has been removed during konnector execution. In this case, we : - Regenerate the files index - create the destination folder according to the manifest - update the trigger with the new message.folder_to_save attribute - retry saveFiles see konnectors/libs#973
Crash--
reviewed
Nov 24, 2023
Crash--
reviewed
Nov 24, 2023
Crash--
approved these changes
Nov 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work ! If you import the .default
for the cozy-client type, then you can remove all the @ts-ignore
doubleface
pushed a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 24, 2023
When this even occurs, it means that the main destination folder of the konnector has been removed during konnector execution. In this case, we : - Regenerate the files index - create the destination folder according to the manifest - update the trigger with the new message.folder_to_save attribute - retry saveFiles see konnectors/libs#973
doubleface
pushed a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 24, 2023
When this even occurs, it means that the main destination folder of the konnector has been removed during konnector execution. In this case, we : - Regenerate the files index - create the destination folder according to the manifest - update the trigger with the new message.folder_to_save attribute - retry saveFiles see konnectors/libs#973
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.
And folders are created only for files which will be downloaded (this avoids creating empty folders when files already exist elsewhere).
This avoids many requests to the stack for each imported files and saves a lot of time
If the destination folder was removed, throw a specific error to let the
flagship app handle the situation (recreate the destination folder,
update the trigger with folder_to_save, etc)
I finally did not need any folder map, since cozy-client has it's own with ensureDirectoryExists