locking test improvements
parent
894cc626c7
commit
ccf83c2f22
|
@ -5866,7 +5866,8 @@ class SharedWorkspaceLocking {
|
|||
}
|
||||
static ReleaseWorkspace(workspace, runId, buildParametersContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const file = (yield SharedWorkspaceLocking.GetAllLocks(workspace, buildParametersContext)).filter((x) => x.endsWith(`_${runId}_${workspace}_workspace_lock`));
|
||||
const files = yield SharedWorkspaceLocking.GetAllLocks(workspace, buildParametersContext);
|
||||
const file = files.find((x) => x.endsWith(`${workspace}_workspace_lock`) && x.includes(runId));
|
||||
cloud_runner_logger_1.default.log(`Deleting lock ${workspace}/${file}`);
|
||||
cloud_runner_logger_1.default.log(`rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`);
|
||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -265,9 +265,8 @@ export class SharedWorkspaceLocking {
|
|||
runId: string,
|
||||
buildParametersContext: BuildParameters,
|
||||
): Promise<boolean> {
|
||||
const file = (await SharedWorkspaceLocking.GetAllLocks(workspace, buildParametersContext)).filter((x) =>
|
||||
x.endsWith(`_${runId}_${workspace}_workspace_lock`),
|
||||
);
|
||||
const files = await SharedWorkspaceLocking.GetAllLocks(workspace, buildParametersContext);
|
||||
const file = files.find((x) => x.endsWith(`${workspace}_workspace_lock`) && x.includes(runId));
|
||||
CloudRunnerLogger.log(`Deleting lock ${workspace}/${file}`);
|
||||
CloudRunnerLogger.log(`rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`);
|
||||
await CloudRunnerSystem.Run(
|
||||
|
|
Loading…
Reference in New Issue