From 7afe165979419f1fd96f6356f32ded35cb143de9 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 3 Oct 2021 12:08:41 -0500 Subject: attempt to fix memory leak --- src/constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/constants.ts') diff --git a/src/constants.ts b/src/constants.ts index 13fc21d..3cc77d2 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -76,7 +76,7 @@ const fileCache = new NodeCache({ */ function fetchFile(path: string): Promise { return new Promise(resolve => { - queue.enqueue(async() => { + queue.enqueue(async () => { if (fileCache.has(path)) return resolve(fileCache.get(path)!) @@ -137,7 +137,7 @@ export let fetchJSONConstant = async function fetchJSONConstant(filename: string } /** Add stats to skyblock-constants. This has caching so it's fine to call many times */ -export let addJSONConstants = async function addJSONConstants(filename: string, addingValues: string[], unit: string='stat'): Promise { +export let addJSONConstants = async function addJSONConstants(filename: string, addingValues: string[], unit: string = 'stat'): Promise { if (addingValues.length === 0) return // no stats provided, just return let file: GithubFile = await fetchFile(filename) @@ -268,7 +268,7 @@ export async function setConstantValues(newValues: constantValues) { const commitMessage = 'Update values' try { await editFile(file, commitMessage, JSON.stringify(updatedStats, null, 2)) - } catch {} + } catch { } } -- cgit