mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Catch Curl error when updating projects
This commit is contained in:
parent
0490ba2951
commit
6c5caa2642
1 changed files with 16 additions and 11 deletions
|
@ -574,6 +574,7 @@ final class Project{
|
|||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
$curl = curl_init($this->VcsUrl);
|
||||
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, Enums\HttpMethod::Head->value); // Only perform HTTP HEAD.
|
||||
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
||||
|
@ -589,6 +590,10 @@ final class Project{
|
|||
|
||||
$this->IsVcsUrlUpdated = true;
|
||||
}
|
||||
catch(Safe\Exceptions\CurlException){
|
||||
// Probably a temporary failure, just continue but don't mark the URL as having been updated.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update this object's `$LastCommitTimestamp` with data from its GitHub repo.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue