fixes
parent
a0430012e5
commit
820fd169ec
|
|
@ -5303,7 +5303,6 @@ class SharedWorkspaceLocking {
|
||||||
const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces(buildParametersContext);
|
const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces(buildParametersContext);
|
||||||
cloud_runner_logger_1.default.log(`run agent ${runId} is trying to access a workspace, free: ${JSON.stringify(workspaces)}`);
|
cloud_runner_logger_1.default.log(`run agent ${runId} is trying to access a workspace, free: ${JSON.stringify(workspaces)}`);
|
||||||
for (const element of workspaces) {
|
for (const element of workspaces) {
|
||||||
await new Promise((promise) => setTimeout(promise, 1000));
|
|
||||||
const lockResult = await SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);
|
const lockResult = await SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);
|
||||||
cloud_runner_logger_1.default.log(`run agent: ${runId} try lock workspace: ${element} locking attempt result: ${lockResult}`);
|
cloud_runner_logger_1.default.log(`run agent: ${runId} try lock workspace: ${element} locking attempt result: ${lockResult}`);
|
||||||
if (lockResult) {
|
if (lockResult) {
|
||||||
|
|
@ -5342,7 +5341,6 @@ class SharedWorkspaceLocking {
|
||||||
const result = [];
|
const result = [];
|
||||||
const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);
|
const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);
|
||||||
for (const element of workspaces) {
|
for (const element of workspaces) {
|
||||||
await new Promise((promise) => setTimeout(promise, 1500));
|
|
||||||
const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParametersContext);
|
const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParametersContext);
|
||||||
const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParametersContext);
|
const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParametersContext);
|
||||||
cloud_runner_logger_1.default.log(`workspace ${element} locked:${isLocked} below max:${isBelowMax}`);
|
cloud_runner_logger_1.default.log(`workspace ${element} locked:${isLocked} below max:${isBelowMax}`);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -76,7 +76,6 @@ export class SharedWorkspaceLocking {
|
||||||
const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces(buildParametersContext);
|
const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces(buildParametersContext);
|
||||||
CloudRunnerLogger.log(`run agent ${runId} is trying to access a workspace, free: ${JSON.stringify(workspaces)}`);
|
CloudRunnerLogger.log(`run agent ${runId} is trying to access a workspace, free: ${JSON.stringify(workspaces)}`);
|
||||||
for (const element of workspaces) {
|
for (const element of workspaces) {
|
||||||
await new Promise((promise) => setTimeout(promise, 1000));
|
|
||||||
const lockResult = await SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);
|
const lockResult = await SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);
|
||||||
CloudRunnerLogger.log(
|
CloudRunnerLogger.log(
|
||||||
`run agent: ${runId} try lock workspace: ${element} locking attempt result: ${lockResult}`,
|
`run agent: ${runId} try lock workspace: ${element} locking attempt result: ${lockResult}`,
|
||||||
|
|
@ -136,7 +135,6 @@ export class SharedWorkspaceLocking {
|
||||||
const result: string[] = [];
|
const result: string[] = [];
|
||||||
const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);
|
const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);
|
||||||
for (const element of workspaces) {
|
for (const element of workspaces) {
|
||||||
await new Promise((promise) => setTimeout(promise, 1500));
|
|
||||||
const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParametersContext);
|
const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParametersContext);
|
||||||
const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParametersContext);
|
const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParametersContext);
|
||||||
CloudRunnerLogger.log(`workspace ${element} locked:${isLocked} below max:${isBelowMax}`);
|
CloudRunnerLogger.log(`workspace ${element} locked:${isLocked} below max:${isBelowMax}`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue