We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 559b9be commit 75a5164Copy full SHA for 75a5164
store/getGcData.ts
@@ -18,7 +18,7 @@ type GcExtraData = {
18
pgroup: PGroup;
19
};
20
21
-const blobArchive = new Archive('blob');
+const blobArchive = config.ENABLE_BLOB_ARCHIVE ? new Archive('blob') : null;
22
23
/**
24
* Return GC data by reading it without fetching.
@@ -33,7 +33,7 @@ export async function readGcData(matchId: number): Promise<GcMatch | null> {
33
);
34
const row = result.rows[0];
35
let gcData = row?.gcdata ? (JSON.parse(row.gcdata) as GcMatch) : undefined;
36
- if(!gcData && config.ENABLE_BLOB_ARCHIVE) {
+ if(!gcData && blobArchive) {
37
const archive = await blobArchive.archiveGet(`${matchId}_gcdata`);
38
gcData = archive ? JSON.parse(archive.toString()) as GcMatch : undefined;
39
}
0 commit comments