Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd SENT_SYNC_RECORDS which is the callback of SEND_SYNC_RECORDS #358
+19
−5
Conversation
client/sync.js
Outdated
| }) | ||
| ) | ||
| }) | ||
| Promise.all(promisePuts).then((records) => { |
This comment has been minimized.
This comment has been minimized.
SergeyZhukovsky
Nov 7, 2019
Member
What happens if some records from records failed to send? We still send the whole array in the call back.
This comment has been minimized.
This comment has been minimized.
darkdh
Nov 7, 2019
Author
Member
that would be caught in the following blocks, partial records will be sent back
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
darkdh
Nov 7, 2019
Author
Member
if this isn't clear, I can use separate array to store "SentRecords"
This comment has been minimized.
This comment has been minimized.
SergeyZhukovsky
Nov 7, 2019
Member
maybe let's just use there something like sentRecords instead of records in the second promise? It would be less confusing in that case.
This comment has been minimized.
This comment has been minimized.
This was referenced Nov 8, 2019
|
++ |
|
Is it possible to add a testcase? |
|
we don't have any tests for this "interface" side of code, object put test is covered in |
|
++ |
darkdh
added a commit
that referenced
this pull request
Nov 8, 2019
Add SENT_SYNC_RECORDS which is the callback of SEND_SYNC_RECORDS
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.
darkdh commentedNov 7, 2019
fix #356
gives back full records when all records are successfully uploaded
or partial records/empty records when error occurred.