fixes
parent
c01f983ad0
commit
e59c0947d4
|
@ -5773,7 +5773,6 @@ class SharedWorkspaceLocking {
|
||||||
const lockResult = yield SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);
|
const lockResult = yield SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);
|
||||||
cloud_runner_logger_1.default.log(`run agent: ${runId} try lock workspace: ${element} result: ${lockResult}`);
|
cloud_runner_logger_1.default.log(`run agent: ${runId} try lock workspace: ${element} result: ${lockResult}`);
|
||||||
if (lockResult) {
|
if (lockResult) {
|
||||||
cloud_runner_1.default.lockedWorkspace = element;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5911,7 +5910,11 @@ class SharedWorkspaceLocking {
|
||||||
fs.writeFileSync(file, '');
|
fs.writeFileSync(file, '');
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 cp ./${file} ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 cp ./${file} ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);
|
||||||
fs.rmSync(file);
|
fs.rmSync(file);
|
||||||
return SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext);
|
const hasLock = yield SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext);
|
||||||
|
if (hasLock) {
|
||||||
|
cloud_runner_1.default.lockedWorkspace = workspace;
|
||||||
|
}
|
||||||
|
return hasLock;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static ReleaseWorkspace(workspace, runId, buildParametersContext) {
|
static ReleaseWorkspace(workspace, runId, buildParametersContext) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -63,8 +63,6 @@ export class SharedWorkspaceLocking {
|
||||||
CloudRunnerLogger.log(`run agent: ${runId} try lock workspace: ${element} result: ${lockResult}`);
|
CloudRunnerLogger.log(`run agent: ${runId} try lock workspace: ${element} result: ${lockResult}`);
|
||||||
|
|
||||||
if (lockResult) {
|
if (lockResult) {
|
||||||
CloudRunner.lockedWorkspace = element;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,7 +255,13 @@ export class SharedWorkspaceLocking {
|
||||||
);
|
);
|
||||||
fs.rmSync(file);
|
fs.rmSync(file);
|
||||||
|
|
||||||
return SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext);
|
const hasLock = await SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext);
|
||||||
|
|
||||||
|
if (hasLock) {
|
||||||
|
CloudRunner.lockedWorkspace = workspace;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hasLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async ReleaseWorkspace(
|
public static async ReleaseWorkspace(
|
||||||
|
|
Loading…
Reference in New Issue