intuitive locking logs from the most important flow
parent
a34c72a0ad
commit
54c186f4cc
|
|
@ -666,13 +666,16 @@ class SharedWorkspaceLocking {
|
||||||
if (!cloud_runner_options_1.default.retainWorkspaces) {
|
if (!cloud_runner_options_1.default.retainWorkspaces) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
cloud_runner_logger_1.default.log(`run agent ${runId} is trying to access a workspace`);
|
||||||
const workspaces = yield SharedWorkspaceLocking.GetFreeWorkspaces();
|
const workspaces = yield SharedWorkspaceLocking.GetFreeWorkspaces();
|
||||||
for (const element of workspaces) {
|
for (const element of workspaces) {
|
||||||
if (yield SharedWorkspaceLocking.LockWorkspace(element, runId)) {
|
if (yield SharedWorkspaceLocking.LockWorkspace(element, runId)) {
|
||||||
|
cloud_runner_logger_1.default.log(`run agent ${runId} locked workspace: ${element}`);
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const workspace = yield SharedWorkspaceLocking.CreateWorkspace(workspaceIfCreated, runId);
|
const workspace = yield SharedWorkspaceLocking.CreateWorkspace(workspaceIfCreated, runId);
|
||||||
|
cloud_runner_logger_1.default.log(`run agent ${runId} didn't find a free workspace so created: ${workspace}`);
|
||||||
return workspace;
|
return workspace;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -23,14 +23,19 @@ export class SharedWorkspaceLocking {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CloudRunnerLogger.log(`run agent ${runId} is trying to access a workspace`);
|
||||||
|
|
||||||
const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces();
|
const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces();
|
||||||
for (const element of workspaces) {
|
for (const element of workspaces) {
|
||||||
if (await SharedWorkspaceLocking.LockWorkspace(element, runId)) {
|
if (await SharedWorkspaceLocking.LockWorkspace(element, runId)) {
|
||||||
|
CloudRunnerLogger.log(`run agent ${runId} locked workspace: ${element}`);
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const workspace = await SharedWorkspaceLocking.CreateWorkspace(workspaceIfCreated, runId);
|
const workspace = await SharedWorkspaceLocking.CreateWorkspace(workspaceIfCreated, runId);
|
||||||
|
CloudRunnerLogger.log(`run agent ${runId} didn't find a free workspace so created: ${workspace}`);
|
||||||
|
|
||||||
return workspace;
|
return workspace;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue