lock put timestamp first
parent
cefd469364
commit
51d46c2cc0
|
|
@ -644,7 +644,7 @@ class SharedWorkspaceLocking {
|
||||||
static LockWorkspace(workspace) {
|
static LockWorkspace(workspace) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// this job + date
|
// this job + date
|
||||||
const file = `_lock_${cloud_runner_1.default.buildParameters.buildGuid}_${Date.now()}`;
|
const file = `${Date.now()}_${cloud_runner_1.default.buildParameters.buildGuid}_lock`;
|
||||||
fs.writeFileSync(file, '');
|
fs.writeFileSync(file, '');
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 cp ./${file} s3://game-ci-test-storage/locks/${workspace}/${file}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 cp ./${file} s3://game-ci-test-storage/locks/${workspace}/${file}`);
|
||||||
fs.rmSync(file);
|
fs.rmSync(file);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -27,7 +27,7 @@ export class SharedWorkspaceLocking {
|
||||||
}
|
}
|
||||||
public static async LockWorkspace(workspace: string): Promise<boolean> {
|
public static async LockWorkspace(workspace: string): Promise<boolean> {
|
||||||
// this job + date
|
// this job + date
|
||||||
const file = `_lock_${CloudRunner.buildParameters.buildGuid}_${Date.now()}`;
|
const file = `${Date.now()}_${CloudRunner.buildParameters.buildGuid}_lock`;
|
||||||
fs.writeFileSync(file, '');
|
fs.writeFileSync(file, '');
|
||||||
await CloudRunnerSystem.Run(`aws s3 cp ./${file} s3://game-ci-test-storage/locks/${workspace}/${file}`);
|
await CloudRunnerSystem.Run(`aws s3 cp ./${file} s3://game-ci-test-storage/locks/${workspace}/${file}`);
|
||||||
fs.rmSync(file);
|
fs.rmSync(file);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue