From fc0a9bb6e86de86050a7b883291abd19d0a2aee8 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 6 Oct 2019 14:06:31 +0100 Subject: [PATCH] Keep running process with delays between of 2 secs --- processes/system.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/processes/system.php b/processes/system.php index d9cb8b9..f028d4d 100644 --- a/processes/system.php +++ b/processes/system.php @@ -1,9 +1,12 @@ array_filter($diffLines)]; -// Store the serialized array in PHP comment block for pick up -file_put_contents($docRoot.$ICEcoderDir."/data/git-diff.php", ""); +while(true) { + $gitData = shell_exec("cd .. && { git diff --name-only --staged ; git ls-files --other --modified --exclude-standard ;} | sort | uniq"); + $diffLines = explode("\n", $gitData); + $output = ["paths" => array_filter($diffLines)]; + // Store the serialized array in PHP comment block for pick up + file_put_contents(dirname(__FILE__)."/../data/git-diff.php", ""); + sleep(2); +} ?>