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

Isolatable CLI commands #12350

Merged
merged 3 commits into from Nov 18, 2022
Merged

Conversation

brandonkelly
Copy link
Member

@brandonkelly brandonkelly commented Nov 18, 2022

Description

Adds an --isolated option to all CLI commands, which will ensure they are run in isolation.

If another request is already running the same command, it will abort with the stderr message The <command name> command is already running. and exit code 1.

(Isolation checking is done via the mutex, which only works when Dev Mode is disabled.)

Examples:

php craft up --isolated
php craft queue/listen --verbose --isolated
php craft gc --isolated

Related issues

@brandonkelly brandonkelly requested a review from a team as a code owner November 18, 2022 19:44
@linear
Copy link

linear bot commented Nov 18, 2022

DEV-1045 Isolatable CLI commands

It should be possible to add an --isolate option to any CLI command, to ensure the command is run in isolation.

Similar to artisan migrate (https://twitter.com/taylorotwell/status/1587447931090731009).

[ci skip]
[ci skip]
@brandonkelly brandonkelly merged commit e5b998f into 4.4 Nov 18, 2022
@brandonkelly brandonkelly deleted the feature/dev-1045-isolatable-cli-commands branch November 18, 2022 19:57
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.

None yet

1 participant