build monitor fix
This commit is contained in:
@@ -47,10 +47,10 @@ class BuildController extends Controller
|
||||
{
|
||||
return response()->stream(function () {
|
||||
while (true) {
|
||||
sleep(1); // 50ms
|
||||
// sleep(1); // 50ms
|
||||
$data["date"] = date("Y-m-d H:i:s");
|
||||
$data["logs"] = file_get_contents(storage_path("lucent/build.log"));
|
||||
$lines = explode("\n",$data["logs"]);
|
||||
// $lines = explode("\n",$data["logs"]);
|
||||
|
||||
echo 'data: ' .json_encode($data);
|
||||
echo "\n\n";
|
||||
@@ -58,7 +58,7 @@ class BuildController extends Controller
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
if(str_contains("Finito",$lines)){
|
||||
if(str_contains($data["logs"],"Finito")){
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user