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

How to get live output from task? #13

Open
safeboot opened this issue May 7, 2024 · 0 comments
Open

How to get live output from task? #13

safeboot opened this issue May 7, 2024 · 0 comments

Comments

@safeboot
Copy link

safeboot commented May 7, 2024

I am trying to get the output of the task which for testing purposes is this:

echo "Hello to a world."
sleep 3
ls -l
echo "Goodbye to a world."

My goal is to get the outputs of the commands and broadcast them so I can have a "live" terminal output on the frontend using Laravel Echo. However I am having issues at the moment, I have tried this:

DeployApp::make($app)->onOutput(function () {
    $this->info('Output received...');
})->dispatch();

...and even to get output using while loop and checking for success status but nothing seems to have worked.

Any ideas?

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

No branches or pull requests

1 participant