mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
chore: adjust gha agent params (#13509)
This commit is contained in:
parent
2a97ad2487
commit
ae4d2e75aa
@ -30,9 +30,10 @@ const log = debug(`pw:grid:server`);
|
|||||||
|
|
||||||
const githubFactory: GridFactory = {
|
const githubFactory: GridFactory = {
|
||||||
name: 'Agents hosted on Github',
|
name: 'Agents hosted on Github',
|
||||||
capacity: 10,
|
// Standard VM is 3-core on mac and 2-core on win and lin
|
||||||
launchTimeout: 30000,
|
capacity: 4,
|
||||||
retireTimeout: 600000,
|
launchTimeout: 10 * 60_000,
|
||||||
|
retireTimeout: 1 * 60 * 60_000,
|
||||||
launch: async (options: GridAgentLaunchOptions) => {
|
launch: async (options: GridAgentLaunchOptions) => {
|
||||||
await createWorkflow(options);
|
await createWorkflow(options);
|
||||||
},
|
},
|
||||||
|
@ -248,18 +248,12 @@ export class GridServer {
|
|||||||
|
|
||||||
this._wsServer.shouldHandle = request => {
|
this._wsServer.shouldHandle = request => {
|
||||||
this._log(request.url);
|
this._log(request.url);
|
||||||
if (request.url!.startsWith(this._securePath('/claimWorker'))) {
|
if (request.url!.startsWith(this._securePath('/claimWorker')) ||
|
||||||
|
request.url!.startsWith(this._securePath('/registerAgent')) ||
|
||||||
|
request.url!.startsWith(this._securePath('/registerWorker'))) {
|
||||||
// shouldHandle claims it accepts promise, except it doesn't.
|
// shouldHandle claims it accepts promise, except it doesn't.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.url!.startsWith(this._securePath('/registerAgent'))
|
|
||||||
|| request.url!.startsWith(this._securePath('/registerWorker'))) {
|
|
||||||
const params = new URL('http://localhost/' + request.url).searchParams;
|
|
||||||
const agentId = params.get('agentId');
|
|
||||||
return !!agentId && this._agents.has(agentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user