Skip to content

Commit

Permalink
Homepage|Build Repository: Quick hack to read events.xml from local file
Browse files Browse the repository at this point in the history
The Autobuilder now makes sure there is always an up-to-date copy
of the events feed on files.dengine.net, so the entire caching step
becomes unnecessary (also, the cached feed wasn't being updated for
some reason).

Todo: Cleanup.
  • Loading branch information
skyjake committed Nov 10, 2015
1 parent 78d9477 commit e79e013
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions web/plugins/buildrepository/buildrepository.php
Expand Up @@ -330,7 +330,7 @@ private static function retrieveBuildLogXml(&$buildLogUri)
*/
private function constructBuilds(&$builds)
{
$buildLogUri = self::XML_FEED_URI;
/* $buildLogUri = self::XML_FEED_URI;
// Is it time to update our cached copy of the build log?
$logCacheName = 'buildrepository/events.xml';
Expand Down Expand Up @@ -360,13 +360,19 @@ private function constructBuilds(&$builds)
// Touch our cached copy so we don't try again too soon.
FrontController::contentCache()->touch($logCacheName);
}
}
}*/

// Re-parse our locally cached copy of the log, hopefully
// we don't need to do this too often (cache everything!).
try
{
$cachedLogXml = FrontController::contentCache()->retrieve($logCacheName);
//$cachedLogXml =
FrontController::contentCache()->retrieve($logCacheName);

$path = nativePath("/home/skyjake/files/builds/events.xml");
$stream = fopen($path, 'r');
$cachedLogXml = stream_get_contents($stream);
fclose($stream);
BuildLogParser::parse($cachedLogXml, $builds);
return TRUE;
}
Expand Down

0 comments on commit e79e013

Please sign in to comment.