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?

Activity

kkz6

kkz6 commented on Apr 3, 2025

@kkz6

This package is defined in the way to call the log file every few seconds and then update in the database or to update entirely in a single shot. Streaming is not supported.
However you can setup a simple node application for this and you can do the same

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

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

        Participants

        @kkz6@safeboot

        Issue actions

          How to get live output from task? · Issue #13 · protonemedia/laravel-task-runner