-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix(cli/file-import): improvements and config(s) hashes or files #1056
Merged
Davidmattei
merged 21 commits into
ems-project:5.x
from
Davidmattei:feat/config-cli-import-command
Nov 4, 2024
Merged
fix(cli/file-import): improvements and config(s) hashes or files #1056
Davidmattei
merged 21 commits into
ems-project:5.x
from
Davidmattei:feat/config-cli-import-command
Nov 4, 2024
Conversation
This file contains 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
Davidmattei
force-pushed
the
feat/config-cli-import-command
branch
3 times, most recently
from
October 29, 2024 08:17
6e27cc1
to
2559e6b
Compare
Davidmattei
force-pushed
the
feat/config-cli-import-command
branch
3 times, most recently
from
November 1, 2024 14:19
5e9b54f
to
eef4839
Compare
The storage can search by fileHash or filePath, returning LocalFile or StorageFile
FileReader use array for options
And improve collecting results
defaultData is always an array and empty if not defined.
Memory save and will return invalid (not parsable) rows
The client is only constructed from the CoreApiFactory.php, so we can safely refactor this.
And just pass the array as input to the factory. No need for parameters 'ems_common.backend_api_verify' or 'ems_common.backend_api_timeout' refactor: new common.core_api settings for verify andn timeout And just pass the array as input to the factory. No need for parameters 'ems_common.backend_api_verify' or 'ems_common.backend_api_timeout'
This speeds up big imports
Davidmattei
force-pushed
the
feat/config-cli-import-command
branch
from
November 2, 2024 15:48
50d4e96
to
15ef994
Compare
theus77
reviewed
Nov 3, 2024
elasticms-cli/src/Command/FileReader/FileReaderImportCommand.php
Outdated
Show resolved
Hide resolved
Davidmattei
force-pushed
the
feat/config-cli-import-command
branch
from
November 4, 2024 08:52
828ad6a
to
0db327e
Compare
theus77
approved these changes
Nov 4, 2024
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.
PhpOffice\PhpSpreadsheet\Reader\Csv
was too slow in parsing big csv files (above 100K rows)** EMS_CORE_API_MAX_CONNECTIONS: define the max connections the coreApi can open (async)
** EMS_CORE_API_HEADERS: define extra headers for the coreApi (easy enable xdebug for the coreApi)
indexAsync
which will index (create, update (merge or replace) the document from the row.Symfony http client supports concurrent requests (async) out of the box. But we can not directly call getContent of getHeaders on the response object, this will block the execution. Instead just save the responses into an array and loop over for handling the responses. For this the queue was added, which will flush the responses on flushSize, calling the destruct of the symfony response object, which will check if the response was good, throwing exceptions on 300 - 500 status codes.