Skip to content

How to get live output from task? #13

Open
@safeboot

Description

@safeboot

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions