Better locking
parent
7af054a390
commit
6ab62f966c
|
|
@ -689,6 +689,9 @@ class SharedWorkspaceLocking {
|
|||
}
|
||||
static ReleaseWorkspace(workspace, runId) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!(yield SharedWorkspaceLocking.DoesWorkspaceExist(workspace))) {
|
||||
return true;
|
||||
}
|
||||
const file = (yield SharedWorkspaceLocking.GetAllLocks(workspace)).filter((x) => x.includes(`_${runId}_lock`));
|
||||
cloud_runner_logger_1.default.log(`${JSON.stringify(yield SharedWorkspaceLocking.GetAllLocks(workspace))}`);
|
||||
cloud_runner_logger_1.default.log(`Deleting file ${file}`);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -76,6 +76,9 @@ export class SharedWorkspaceLocking {
|
|||
}
|
||||
|
||||
public static async ReleaseWorkspace(workspace: string, runId: string): Promise<boolean> {
|
||||
if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace))) {
|
||||
return true;
|
||||
}
|
||||
const file = (await SharedWorkspaceLocking.GetAllLocks(workspace)).filter((x) => x.includes(`_${runId}_lock`));
|
||||
CloudRunnerLogger.log(`${JSON.stringify(await SharedWorkspaceLocking.GetAllLocks(workspace))}`);
|
||||
CloudRunnerLogger.log(`Deleting file ${file}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue