madeindjs / nestjs-graphile-worker

A Nest.js wrapper for Graphile Worker
https://www.npmjs.com/package/nestjs-graphile-worker
MIT License
35 stars 14 forks source link

WorkerService run returns an incorrect object #15

Closed sviatoslav-lebediev closed 8 months ago

sviatoslav-lebediev commented 9 months ago

It seems that in the WorkerService run method, runner.promise is returned instead of returning a runner. As a result, it is not possible to stop the runner manually. I can create a PR, but the question is, do I need to create a separate method, or is it okay to change an interface and return a runner instead of void?

https://github.com/madeindjs/nestjs-graphile-worker/blob/e94ce7fde597dde64ebd0363dececa62e8735e93/src/services/worker.service.ts#L41

madeindjs commented 9 months ago

Thanks for the report, I think it's fine to return the runner instead of nothing. You can create a PR and increment the minor version, I will accept it and merge it 😉

sviatoslav-lebediev commented 9 months ago

The PR is here https://github.com/madeindjs/nestjs-graphile-worker/pull/16 , if everything is ok please release it when you have time. Thank you

madeindjs commented 8 months ago

@sviatoslav-lebediev I merged you PR and it's on NPM now. Thank you

sviatoslav-lebediev commented 8 months ago

thank you p.s. when you have time pls take a look at https://github.com/madeindjs/nestjs-graphile-worker/pull/16#discussion_r1473969253