Fix count not being incremented

This commit is contained in:
1computer1 2019-05-16 22:52:15 -04:00
parent 9a9c2b3d95
commit 80c12e0456

View file

@ -85,9 +85,14 @@ class LanguageHandler extends AkairoHandler {
}
}
incrementCount(id) {
this.containers.get(id).count += 1;
}
async evalCode({ language, code, options }) {
const { id = language.id, env = {} } = language.runWith(options);
const { name, count } = await this.setupContainer(id);
this.incrementCount(id);
const proc = childProcess.spawn('docker', [
'exec',
`-eCOUNT=${count}`,