Skip to content

Block API set_app_target until target is accepted#48

Draft
pipex wants to merge 1 commit intomainfrom
ack-channel-for-api-requests
Draft

Block API set_app_target until target is accepted#48
pipex wants to merge 1 commit intomainfrom
ack-channel-for-api-requests

Conversation

@pipex
Copy link
Copy Markdown
Contributor

@pipex pipex commented Aug 27, 2025

This involves the creation of a new ack_watch channel, that adds a send_and_wait function that gets blocked until the receiver accepts the request. The channel is configured in such a way that if the request gets dropped (because it got replaced with a new request), then the send_and_wait method returns an error.

The API POST /v3/device/apps/{uuid} endpoint will error with a 409 Conflict in case the state got replaced.

This should make it easier for users of the API to know when the provided state got accepted by the worker or when it won't be processed.

Change-type: minor

@pipex pipex marked this pull request as draft August 27, 2025 19:45
@pipex
Copy link
Copy Markdown
Contributor Author

pipex commented Aug 27, 2025

This involves the creation of a new ack_watch channel, that adds a
`send_and_wait` function that gets blocked until the receiver accepts
the request. The channel is configured in such a way that if the request
gets dropped (because it got replaced with a new request), then the
`send_and_wait` method returns an error.

The API `POST /v3/device/apps/{uuid}` endpoint will error with a 409
Conflict in case the state got replaced.

This should make it easier for users of the API to know when the
provided state got accepted by the worker or when it won't be processed.

Change-type: minor
@pipex pipex force-pushed the ack-channel-for-api-requests branch from 4403729 to ee34b8f Compare August 27, 2025 20:12
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