ActionsService
This class implements the ActionsService gRPC API.
Methods
Signal()
@classmethod
def Signal(
ctx: context.Context,
c: *connect.Request[actions.SignalRequest]
) - > *connect.Response[actions.SignalResponse], error
Sends a signal to an action. This method is used to communicate events or data to an ongoing action.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the gRPC call, allowing cancellation and carrying request-scoped values. |
| c | *connect.Request[actions.SignalRequest] | The request containing the signal data to be sent to the action. |
Returns
| Type | Description |
|---|---|
*connect.Response[actions.SignalResponse], error | A response indicating the success or failure of the signal operation, or an error if the operation failed. |
Enqueue()
@classmethod
def Enqueue(
ctx: context.Context,
req: *connect.Request[actions.EnqueueRequest]
) - > *connect.Response[actions.EnqueueResponse], error
Enqueues a new action to be processed. This method adds an action to a queue for asynchronous execution.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the gRPC call, allowing cancellation and carrying request-scoped values. |
| req | *connect.Request[actions.EnqueueRequest] | The request containing the details of the action to be enqueued. |
Returns
| Type | Description |
|---|---|
*connect.Response[actions.EnqueueResponse], error | A response confirming the action has been enqueued, or an error if the enqueue operation failed. |
WatchForUpdates()
@classmethod
def WatchForUpdates(
ctx: context.Context,
req: *connect.Request[actions.WatchForUpdatesRequest],
stream: *connect.ServerStream[actions.WatchForUpdatesResponse]
) - > error
Establishes a stream to watch for updates related to actions. This method allows clients to receive real-time notifications about action status changes or other relevant updates.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the gRPC call, allowing cancellation and carrying request-scoped values. |
| req | *connect.Request[actions.WatchForUpdatesRequest] | The request specifying criteria for the updates to watch for. |
| stream | *connect.ServerStream[actions.WatchForUpdatesResponse] | The server stream through which update responses will be sent to the client. |
Returns
| Type | Description |
|---|---|
error | An error if the stream encountered an issue or was terminated unexpectedly. |
Update()
@classmethod
def Update(
ctx: context.Context,
req: *connect.Request[actions.UpdateRequest]
) - > *connect.Response[actions.UpdateResponse], error
Updates the state or properties of an existing action. This method is used to modify an action after it has been created or enqueued.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the gRPC call, allowing cancellation and carrying request-scoped values. |
| req | *connect.Request[actions.UpdateRequest] | The request containing the updated details for the action. |
Returns
| Type | Description |
|---|---|
*connect.Response[actions.UpdateResponse], error | A response confirming the action has been updated, or an error if the update operation failed. |
Abort()
@classmethod
def Abort(
ctx: context.Context,
req: *connect.Request[actions.AbortRequest]
) - > *connect.Response[actions.AbortResponse], error
Aborts an ongoing or pending action. This method is used to stop the execution of an action prematurely.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the gRPC call, allowing cancellation and carrying request-scoped values. |
| req | *connect.Request[actions.AbortRequest] | The request identifying the action to be aborted. |
Returns
| Type | Description |
|---|---|
*connect.Response[actions.AbortResponse], error | A response confirming the action has been aborted, or an error if the abort operation failed. |