Change GitHub webhook from building immediately, to queuing builds with task-spooler

This commit is contained in:
Alex Cabal 2020-02-29 22:28:04 -06:00
parent 3669289517
commit d56cb360cc
2 changed files with 4 additions and 4 deletions

View file

@ -102,13 +102,13 @@ try{
}
// Our local repo is now updated. Build the ebook!
exec('sudo --set-home --user se-vcs-bot /standardebooks.org/web/scripts/deploy-ebook-to-www ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode);
exec('sudo --set-home --user se-vcs-bot tsp -n /standardebooks.org/web/scripts/deploy-ebook-to-www ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode);
if($returnCode != 0){
Logger::WriteGithubWebhookLogEntry($requestId, 'Error deploying ebook to web. Output: ' . implode("\n", $output));
Logger::WriteGithubWebhookLogEntry($requestId, 'Error queueing ebook for deployment to web. Output: ' . implode("\n", $output));
throw new WebhookException('Couldn\'t process ebook.', $post);
}
else{
Logger::WriteGithubWebhookLogEntry($requestId, 'Deploy to web complete.');
Logger::WriteGithubWebhookLogEntry($requestId, 'Queue for deployment to web complete.');
}
break;