add timeout

This commit is contained in:
Varun Sharma 2023-11-13 19:47:23 -08:00
commit a2d24fd62e
3 changed files with 4 additions and 3 deletions

2
dist/pre/index.js vendored
View file

@ -95710,7 +95710,7 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
let statusCode;
//_http.requestOptions = { socketTimeout: 3 * 1000 };
try {
const resp = yield lib_axios.get(`${api_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`);
const resp = yield lib_axios.get(`${api_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`, { timeout: 3000 });
statusCode = resp.status; // adding error code to check whether agent is getting installed or not.
console.log(`statuscode: ${statusCode}`);
/*fs.appendFileSync(

File diff suppressed because one or more lines are too long

View file

@ -155,7 +155,8 @@ import { isArcRunner, sendAllowedEndpoints } from "./arc-runner";
//_http.requestOptions = { socketTimeout: 3 * 1000 };
try {
const resp = await axios.get(
`${api_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`
`${api_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`,
{ timeout: 3000 }
);
statusCode = resp.status; // adding error code to check whether agent is getting installed or not.