Skip to content

Commit

Permalink
Only mark job as package gone if actually gone, not just postponed
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Apr 19, 2024
1 parent 00eb002 commit d0f9177
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Service/UpdaterWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,19 @@ public function process(Job $job, SignalHandler $signal): array
$this->getEM()->persist($package);
$this->getEM()->flush();

if ($found404 === true) {
return [
'status' => Job::STATUS_PACKAGE_GONE,
'message' => 'Update of '.$packageName.' failed, package appears to be 404/gone and has been marked frozen.',
'details' => '<pre>'.$output.'</pre>',
'exception' => $e,
'vendor' => $packageVendor,
];
}

return [
'status' => Job::STATUS_PACKAGE_GONE,
'message' => 'Update of '.$packageName.' failed, package appears to be 404/gone and has been marked frozen.',
'status' => Job::STATUS_FAILED,
'message' => 'Package data of '.$packageName.' could not be downloaded. Could not reach remote VCS server. Please try again later.',
'details' => '<pre>'.$output.'</pre>',
'exception' => $e,
'vendor' => $packageVendor,
Expand Down

0 comments on commit d0f9177

Please sign in to comment.