extract lib in caching flow
parent
7ad6ffd3f7
commit
7c0eda570d
|
@ -5856,7 +5856,7 @@ class SharedWorkspaceLocking {
|
||||||
}
|
}
|
||||||
static LockWorkspace(workspace, runId, buildParametersContext) {
|
static LockWorkspace(workspace, runId, buildParametersContext) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const file = `${Date.now()}_${runId}_${workspace}_lock`;
|
const file = `${Date.now()}_${runId}_${workspace}_workspace_lock`;
|
||||||
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);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -244,7 +244,7 @@ export class SharedWorkspaceLocking {
|
||||||
runId: string,
|
runId: string,
|
||||||
buildParametersContext: BuildParameters,
|
buildParametersContext: BuildParameters,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const file = `${Date.now()}_${runId}_${workspace}_lock`;
|
const file = `${Date.now()}_${runId}_${workspace}_workspace_lock`;
|
||||||
fs.writeFileSync(file, '');
|
fs.writeFileSync(file, '');
|
||||||
await CloudRunnerSystem.Run(
|
await CloudRunnerSystem.Run(
|
||||||
`aws s3 cp ./${file} ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`,
|
`aws s3 cp ./${file} ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`,
|
||||||
|
|
Loading…
Reference in New Issue