Skip to content

Commit

Permalink
Make attempts configurable (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Jun 26, 2024
1 parent b81bd3f commit ffa2781
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/src/util/add-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function addTest(request) {
// The number of objects to keep in the queue before removal
const removeOnComplete = nconf.get('queue:removeOnComplete') || 200;
const removeOnFail = nconf.get('queue:removeOnFail') || 400;

const attempts = nconf.get('queue:attempts') || 1;
const userConfig = {
browsertime: {
browser,
Expand Down Expand Up @@ -145,7 +145,8 @@ export async function addTest(request) {
jobId,
removeOnComplete,
removeOnFail,
priority
priority,
attempts
}
);

Expand All @@ -170,6 +171,7 @@ export async function addTestFromAPI(
// The number of objects to keep in the queue before removal
const removeOnComplete = nconf.get('queue:removeOnComplete') || 200;
const removeOnFail = nconf.get('queue:removeOnFail') || 400;
const attempts = nconf.get('queue:attempts') || 1;

const deviceId =
get(userConfig, 'browsertime.firefox.android.deviceSerial') ||
Expand Down Expand Up @@ -209,7 +211,8 @@ export async function addTestFromAPI(
jobId,
removeOnComplete,
removeOnFail,
priority: priority || 10
priority: priority || 10,
attempts
};

await testRunnerQueue.add(
Expand Down

0 comments on commit ffa2781

Please sign in to comment.