csivitu / code-executor

A CLI/library to execute code against test cases in various languages and obtain relevant results. :rocket:
https://www.npmjs.com/package/code-executor
MIT License
16 stars 2 forks source link

Probably do not need internal resolve/reject map #18

Closed thebongy closed 4 years ago

thebongy commented 4 years ago

I was browsing through the bulljs reference docs, and found that every job has job.finished() which returns a promise that resolves when the job has finished https://github.com/OptimalBits/bull/blob/develop/REFERENCE.md#jobfinished

So technically, we do not need the internal map logic in code-executor which maintains maps from job IDs to promises, as bulljs already does this internally. https://github.com/csivitu/code-executor/blob/b69766f9f629ba31f40afc8198356605041f541d/src/CodeExecutor.ts#L15-L39

alias-rahil commented 4 years ago

I'll take this too.

roerohan commented 4 years ago

Yep, the map isn't needed, closing this issue :D