Skip to content

Commit

Permalink
Fix Analysis initialization to ensure proper Resource setup
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorfdl authored Nov 28, 2024
1 parent d404535 commit 890a115
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

const { Analysis, Device, Utils } = require("@tago-io/sdk");

// The function myAnalysis will run when you execute your analysis
async function myAnalysis(context) {
// The function startAnalysis will run when you execute your analysis
async function startAnalysis(context) {
// reads the values from the environment and saves it in the variable env_vars
const env_vars = Utils.envToJson(context.environment);

Expand Down Expand Up @@ -61,7 +61,7 @@ async function myAnalysis(context) {
}
}

module.exports = new Analysis(myAnalysis);
Analysis.use(startAnalysis);

// To run analysis on your machine (external)
// module.exports = new Analysis(myAnalysis, { token: "YOUR-TOKEN" });
// Analysis.use(myAnalysis, { token: "YOUR-TOKEN" });

0 comments on commit 890a115

Please sign in to comment.