consider lock folders without workspace file locked
parent
8ec7c6c485
commit
60a142b8de
|
|
@ -710,8 +710,13 @@ class SharedWorkspaceLocking {
|
|||
return false;
|
||||
}
|
||||
const files = yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${workspace}/`);
|
||||
// 1 Because we expect 1 workspace file to exist in every workspace folder
|
||||
return files.length > 1;
|
||||
const workspaceFileDoesNotExists = files.filter((x) => {
|
||||
return x.includes(`_workspace`);
|
||||
}).length === 0;
|
||||
const lockFilesExist = files.filter((x) => {
|
||||
return x.includes(`_lock`);
|
||||
}).length > 0;
|
||||
return workspaceFileDoesNotExists || lockFilesExist;
|
||||
});
|
||||
}
|
||||
static CreateWorkspace(workspace, lockId = ``) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -71,8 +71,17 @@ export class SharedWorkspaceLocking {
|
|||
`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${workspace}/`,
|
||||
);
|
||||
|
||||
// 1 Because we expect 1 workspace file to exist in every workspace folder
|
||||
return files.length > 1;
|
||||
const workspaceFileDoesNotExists =
|
||||
files.filter((x) => {
|
||||
return x.includes(`_workspace`);
|
||||
}).length === 0;
|
||||
|
||||
const lockFilesExist =
|
||||
files.filter((x) => {
|
||||
return x.includes(`_lock`);
|
||||
}).length > 0;
|
||||
|
||||
return workspaceFileDoesNotExists || lockFilesExist;
|
||||
}
|
||||
|
||||
public static async CreateWorkspace(workspace: string, lockId: string = ``) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue