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] Parallel execution of actions #249

Open
cegento opened this issue May 10, 2024 · 1 comment
Open

[Feature] Parallel execution of actions #249

cegento opened this issue May 10, 2024 · 1 comment

Comments

@cegento
Copy link

cegento commented May 10, 2024

Is it possible to add a feature to be able to have parallel executions?

One Example:

"pre-commit": {
    "enabled": true,
    "actions": [
        {
            "action": "Action1"
        },
        {
            "action": "\\Parallel\\Actions",
            "actions": [
                {
                    "action": "Action2"

                },
                {
                    "action": "Action3"
                }
            ]
        },
        {
            "action": "Action4"
        }
    ]
},

Execute Action1
                           ↓ (wait to finnish)
Execute Action2 and Action3 in parallel
                           ↓ (wait to finnish)
Execute Action4
@sebastianfeldmann
Copy link
Collaborator

Nothing is impossible :)

Since there is currently no way to parallel execution other than creating sub processes I'm not actively looking into it right now.

The idea would be to allow to change the default or configure it for every action separately.

"config": {
    "run-async": true
}
"pre-commit": {
    "enabled": true,
    "actions": [
        {
            "action": "some command"
            "options": {
                "some": value
            },
            "config": {
                "run-async": false
             }
        },

Pretty similar to how the go version of the Cap'n handles it.

As I said I'm not working on it right now. I don't think you should do things that take that long that parallel execution makes a difference anyway. But, that does not mean I would not be open to discuss the feature if somebody else want to look into it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants