Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/181 asynchronous return execution #183

Merged

Conversation

lucamrgs
Copy link
Collaborator

Added asynchronous logic to return execution details as soon as available

@lucamrgs lucamrgs self-assigned this Jul 23, 2024
@lucamrgs lucamrgs linked an issue Jul 23, 2024 that may be closed by this pull request
@@ -34,7 +34,7 @@ type ExecutionDetails struct {
}

type IDecomposer interface {
Execute(playbook cacao.Playbook) (*ExecutionDetails, error)
Execute(playbook cacao.Playbook, details chan ExecutionDetails) (*ExecutionDetails, error)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a new interface to leave this one as is ExecuteAsync and Execute so the Playbook action step can be untouched.

@@ -69,11 +69,18 @@ type Decomposer struct {
}

// Execute a Playbook
func (decomposer *Decomposer) Execute(playbook cacao.Playbook) (*ExecutionDetails, error) {
func (decomposer *Decomposer) Execute(playbook cacao.Playbook, execution_details_ch chan ExecutionDetails) (*ExecutionDetails, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Exection details can be moved into two different functions and the rest of the execution can be doen in execute(..)

@lucamrgs lucamrgs marked this pull request as ready for review July 23, 2024 12:24
@MaartendeKruijf MaartendeKruijf merged commit 90e1f3d into development Jul 23, 2024
9 checks passed
@MaartendeKruijf MaartendeKruijf deleted the feature/181-asynchronous-return-execution-id branch July 23, 2024 12:43
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.

Asynchronous return execution ID upon playbook trigger API
2 participants