fix memory checking issue
parent
6ebddbf9e0
commit
c5ddad81c7
|
@ -25,13 +25,22 @@ export default function memory(client: Client) {
|
||||||
// memory in megabytes
|
// memory in megabytes
|
||||||
const memoryConversion = mem / 1024 / 1024;
|
const memoryConversion = mem / 1024 / 1024;
|
||||||
console.log(memoryLimits);
|
console.log(memoryLimits);
|
||||||
let userLimits: { soft: number, hard: number };
|
const userLimits: { soft?: number, hard?: number } = {};
|
||||||
if (acc.tier === 1) {
|
switch (acc.tier) {
|
||||||
userLimits = { soft: memoryLimits.TIER_1_SOFT, hard: memoryLimits.TIER_1_HARD };
|
case 1:
|
||||||
} else if (acc.tier === 2) {
|
userLimits.soft = memoryLimits.TIER_1_SOFT;
|
||||||
userLimits = { soft: memoryLimits.TIER_2_SOFT, hard: memoryLimits.TIER_2_HARD };
|
userLimits.hard = memoryLimits.TIER_1_HARD;
|
||||||
} else if (acc.tier === 3) {
|
break;
|
||||||
userLimits = { soft: memoryLimits.TIER_3_SOFT, hard: memoryLimits.TIER_3_HARD };
|
case 2:
|
||||||
|
userLimits.soft = memoryLimits.TIER_2_SOFT;
|
||||||
|
userLimits.hard = memoryLimits.TIER_2_HARD;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
userLimits.soft = memoryLimits.TIER_3_SOFT;
|
||||||
|
userLimits.hard = memoryLimits.TIER_3_HARD;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
console.log(userLimits);
|
console.log(userLimits);
|
||||||
|
|
||||||
|
@ -80,5 +89,5 @@ export default function memory(client: Client) {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
client.util.handleError(err);
|
client.util.handleError(err);
|
||||||
}
|
}
|
||||||
}, 30000);
|
}, 60000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue