From 2b8772dbfbf49079508c48f0f1fad4bbf4a90331 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 29 Mar 2020 05:22:22 -0400 Subject: [PATCH] fix memory checking issue --- src/intervals/memory.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intervals/memory.ts b/src/intervals/memory.ts index 87c5d60..d285e3b 100644 --- a/src/intervals/memory.ts +++ b/src/intervals/memory.ts @@ -34,7 +34,8 @@ export default function memory(client: Client) { /* if the user has exceeded their soft memory limit, which is the one described in the resource limit guidelines, we'll inform staff. */ - if (acc.tier === 1 && memoryConversion >= userLimits.soft) { + if (memoryConversion >= userLimits.soft) { + client.signale.info(`RAM Soft Limit Reached | ${acc.username} | ${memoryConversion}/${userLimits.soft} MB`); const embed = new RichEmbed(); if (client.users.get(acc.userID)) embed.setThumbnail(client.users.get(acc.userID).avatarURL); embed.addField('User', `${acc.username} | <@${acc.userID}> | ${acc.userID}`, true); @@ -46,6 +47,7 @@ export default function memory(client: Client) { // if they exceed the hard limit, we'll kill all of their processes. if (memoryConversion >= userLimits.hard) { + client.signale.info(`RAM Hard Limit Reached | ${acc.username} | ${memoryConversion}/${userLimits.hard} MB`); client.util.exec(`killall -9 -u ${acc.username}`); embed.setTitle('Resource Enforcement Notification'); embed.setDescription('Someone has reached the (hard) resource limit for their tier on RAM. The system has automatically killed all of their processes.');