Closed thebongy closed 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
job.finished()
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
I'll take this too.
Yep, the map isn't needed, closing this issue :D
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#jobfinishedSo 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