mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +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 = {
|
||||
name: 'Agents hosted on Github',
|
||||
capacity: 10,
|
||||
launchTimeout: 30000,
|
||||
retireTimeout: 600000,
|
||||
// Standard VM is 3-core on mac and 2-core on win and lin
|
||||
capacity: 4,
|
||||
launchTimeout: 10 * 60_000,
|
||||
retireTimeout: 1 * 60 * 60_000,
|
||||
launch: async (options: GridAgentLaunchOptions) => {
|
||||
await createWorkflow(options);
|
||||
},
|
||||
|
@ -248,18 +248,12 @@ export class GridServer {
|
||||
|
||||
this._wsServer.shouldHandle = request => {
|
||||
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.
|
||||
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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user