update gcs write logic, fix build cost bug

This commit is contained in:
Evan
2024-12-04 19:59:44 -08:00
committed by evanpelle
parent 0aac25dc51
commit 926b6d2fb1
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -147,7 +147,8 @@ export class GameServer {
}
});
try {
if (this.turns.length > 100 && this.clients.length > 0) {
if (this.turns.length > 350) {
console.log(`writing game ${this.id} to gcs`)
const bucket = storage.bucket(this.config.gameStorageBucketName());
const file = bucket.file(this.id);
const game = {