-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBS-8523 Extract deployment creation logic to ReservationDeploymentFa…
…ctory.kt (#600) * MBS-8523 Extract deployment creation logic to ReservationDeploymentFactory.kt Delete usages of GlobalScope in Reservation Clients Delete GroupedCoroutinesExecution.kt Make ReservationClient.kt interface simpler
- Loading branch information
1 parent
0bcc82e
commit e1feaab
Showing
13 changed files
with
436 additions
and
589 deletions.
There are no files selected for viewing
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
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
17 changes: 10 additions & 7 deletions
17
...n-tests/src/main/kotlin/com/avito/instrumentation/reservation/client/ReservationClient.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
package com.avito.instrumentation.reservation.client | ||
|
||
import com.avito.runner.service.worker.device.Serial | ||
import com.avito.instrumentation.reservation.request.Reservation | ||
import kotlinx.coroutines.channels.SendChannel | ||
import com.avito.runner.service.worker.device.Serial | ||
import kotlinx.coroutines.channels.ReceiveChannel | ||
|
||
interface ReservationClient { | ||
suspend fun claim( | ||
reservations: Collection<Reservation.Data>, | ||
serialsChannel: SendChannel<Serial>, | ||
reservationDeployments: SendChannel<String> | ||
|
||
class ClaimResult( | ||
val serials: ReceiveChannel<Serial> | ||
) | ||
|
||
suspend fun release(reservationDeployments: Collection<String>) | ||
suspend fun claim( | ||
reservations: Collection<Reservation.Data> | ||
): ClaimResult | ||
|
||
suspend fun release() | ||
} |
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
Oops, something went wrong.