Skip to content

Commit

Permalink
Always return a customer on the waiting list
Browse files Browse the repository at this point in the history
  • Loading branch information
basdgrt committed Oct 24, 2023
1 parent 614e081 commit 6702c6e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlin.time.Duration.Companion.seconds
*
* Requirements:
* - Update the database first and [fetchCustomersOnWaitingList] afterward (sequentially).
* - Sent out the emails the customers concurrently.
* - Send out the emails the customers concurrently.
* - The total execution time of the function should be a little over 5 seconds.
*/

Expand All @@ -27,7 +27,7 @@ suspend fun fetchCustomersOnWaitingList(productId: Int): List<CustomerId> {
1 -> listOf(CustomerId("a"), CustomerId("b"), CustomerId("c"), CustomerId("d"))
10 -> listOf(CustomerId("f"), CustomerId("g"))
100 -> listOf(CustomerId("r"))
else -> emptyList()
else -> listOf(CustomerId("x"))
}
}

Expand Down

0 comments on commit 6702c6e

Please sign in to comment.