Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use centralized biolink/schema version tags #690

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/controllers/async/asyncquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ exports.asyncqueryResponse = async (handler, callback_url, jobID = null, jobURL
results: [],
},
status: "Failed",
schema_version: '1.4.0',
schema_version: global.SCHEMA_VERSION,
biolink_version: global.BIOLINK_VERSION,
workflow: [{ id: 'lookup' }],
description: e.toString(),
trace: process.env.NODE_ENV === "production" ? undefined : e.stack,
Expand All @@ -177,7 +178,7 @@ exports.asyncqueryResponse = async (handler, callback_url, jobID = null, jobURL
if (jobID) {
await storeQueryResponse(jobID, response);
}

throw e;
}

Expand Down
5 changes: 3 additions & 2 deletions src/controllers/async/asyncquery_queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ exports.getQueryQueue = name => {
await axios({
method: "post",
url: job.data.callback_url,
schema_version: '1.4.0',
schema_version: global.SCHEMA_VERSION,
biolink_version: global.BIOLINK_VERSION,
workflow: [{ id: 'lookup' }],
logs: logs,
data: {
Expand All @@ -84,4 +85,4 @@ exports.getQueryQueue = name => {
});

return global.queryQueue[name];
};
};
4 changes: 3 additions & 1 deletion src/controllers/threading/taskHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Sentry.init({
const runTask = async ({ req, route, port, job: { jobId, queueName } = {} }) => {
debug(`Worker thread ${threadId} beginning task.`);

global.SCHEMA_VERSION = "1.4.0"

global.parentPort = port;
port.postMessage({ threadId, registerId: true });
global.cachingTasks = [];
Expand All @@ -49,7 +51,7 @@ const runTask = async ({ req, route, port, job: { jobId, queueName } = {} }) =>

const transaction = Sentry.startTransaction({ name: route });
transaction.setData("request", req.data.queryGraph);
Sentry.getCurrentHub().configureScope((scope) => {
Sentry.getCurrentHub().configureScope((scope) => {
scope.clearBreadcrumbs();
scope.setSpan(transaction);
});
Expand Down
Loading