Skip to content

Commit

Permalink
narrow down search for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed Sep 22, 2024
1 parent 792e50d commit 851797e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions build-logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ class BuildLogging {
return results;
}

async getLogging(build_dt) {
async getLogging(library, library_version, arch, build_dt) {
const stmt = await this.connection.prepare(
`select library, library_version, compiler, compiler_version, arch, libcxx, compiler_flags, success, build_dt, logging
from latest
where build_dt=@build_dt`
where library=@library and library_version=@library_version and arch=@arch and build_dt=@build_dt`
);

await stmt.bind({
'@library': library,
'@library_version': library_version,
'@arch': arch,
'@build_dt': build_dt
});

Expand Down
2 changes: 1 addition & 1 deletion html/failedbuilds.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
row.find('.extraflags').html(build.compiler_flags);

const downloadlink = $("<a />");
downloadlink.attr("href", urlprefix + "/getlogging/" + build.build_dt);
downloadlink.attr("href", urlprefix + "/getlogging/" + build.library + "/" + build.library_version + "/" + (build.arch || '%20') + '/' + build.build_dt);
downloadlink.html("logging");
row.find('.logging').append(downloadlink);

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,8 @@ function main() {
.options('/getlogging', expireshourly, async (req, res) => {
res.send();
})
.get('/getlogging/:dt', expireshourly, async (req, res) => {
const logging = await buildlogging.getLogging(req.params.dt);
.get('/getlogging/:library/:library_version/:arch/:dt', expireshourly, async (req, res) => {
const logging = await buildlogging.getLogging(req.params.library, req.params.library_version, req.params.arch.trim(), req.params.dt);

if (logging) {
const entry = logging[0];
Expand Down

0 comments on commit 851797e

Please sign in to comment.