Making several attempts when trying to read the includes map file
Publish PHP Package / docker (push) Successful in 5s
Details
Publish PHP Package / docker (push) Successful in 5s
Details
This commit is contained in:
parent
fd876d28e2
commit
cdf0d6dc78
|
@ -437,7 +437,24 @@ function config_get_includes_map_path() : string
|
|||
function config_load_includes_map(?string $file = null) : array
|
||||
{
|
||||
$file = $file ? $file : config_get_includes_map_path();
|
||||
//NOTE: workaround for Windows file locking issues
|
||||
$attempts = 3;
|
||||
while($attempts-- > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _config_load_includes_map($file);
|
||||
}
|
||||
catch(Exception)
|
||||
{}
|
||||
usleep(100);
|
||||
echo "Reading includes file '$file' next attempt (left $attempts) ...\n";
|
||||
}
|
||||
throw new Exception("Could not read includes file '$file'");
|
||||
}
|
||||
|
||||
function _config_load_includes_map(string $file = null) : array
|
||||
{
|
||||
$includes_map = array(array(), array());
|
||||
|
||||
if(is_file($file))
|
||||
|
|
Loading…
Reference in New Issue