Skip to content

process object to get lastOutputTime #28026

Closed
@lichnow

Description

@lichnow

Description
I run watch webpack build by symfony process,but when i can not check if is building before wait.so ,i should a public method in process class to get lastOutputTime to check it.

Example

$this->runner($params, $messages, true,function(Process $process,$progressBar){
                $process->setTimeout(null);
                $process->start();
                $process->wait(function ($type, $buffer) use($progressBar) {
                    if (microtime(true) - $process->getLastOutputTime() > 10){
                        $this->output->writeln("<fg=yellow>start to watch</>");
                    }
                });
            });

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureGood first issueIdeal for your first contribution! (some Symfony experience may be required)Process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions