Skip to content

Conversation

@BlessedAmrita
Copy link

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work is based on designs, which are linked or shown either in the Jira ticket or the description below. (See also: Styleguide)
  • My work includes tests or is validated by existing tests.

Summary

This PR updates the order basket submission logic to submit multiple orders concurrently instead of sequentially.

Previously, postOrders awaited each individual order submission inside a loop, causing requests to be sent one after another. This was mentioned in the discussion of PR #2920. Following that discussion, this change refactors the logic to submit all orders in parallel while still collecting per-order success and error results.

The existing behavior and return structure are preserved by using Promise.allSettled, ensuring partial failures do not block other order submissions.

Screenshots

Related Issue

https://issues.openmrs.org/browse/O3-5322

Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant