3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 08:45:03 +00:00

Remove erroneous lock

Lock was acquired here and in the actual method, causing the actual method to wait 10 minutes for the timeout
This commit is contained in:
Dark 2021-06-03 02:34:06 +02:00
parent a07ca88c13
commit 167cf2adf1

View file

@ -48,9 +48,7 @@ export const ResetAllCounterValuesCmd = typedGuildCommand<CountersPluginType>()(
.send(`Resetting counter **${counterName}**. This might take a while. Please don't reload the config.`) .send(`Resetting counter **${counterName}**. This might take a while. Please don't reload the config.`)
.catch(() => null); .catch(() => null);
const lock = await pluginData.locks.acquire(counterIdLock(counterId), 10 * MINUTES);
await resetAllCounterValues(pluginData, args.counterName); await resetAllCounterValues(pluginData, args.counterName);
lock.interrupt();
loadingMessage?.delete().catch(noop); loadingMessage?.delete().catch(noop);
sendSuccessMessage(pluginData, message.channel, `All counter values for **${counterName}** have been reset`); sendSuccessMessage(pluginData, message.channel, `All counter values for **${counterName}** have been reset`);