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

Event listeners are not registered #3

Closed klawel closed 1 year ago

klawel commented 2 years ago

The event listeners in @GraphileWorkerListener() are not registered properly. This is also the case in your sample app.

Looking for a fix myself, I found that @kiurchv did solve this problem in his fork https://github.com/kiurchv/nestjs-graphile-worker/tree/fix/discovery.

Since you are the owner of the published npm package, could you try to fix the subscription because I really like your wrapper.

madeindjs commented 2 years ago

Thanks for the issue.

I open a PR (#4 ) from the branch bellow and I will merge and publish it.

It's weird because it seem to me that onModuleInit is a better place for explore. Have you a deeper understanding why using explore into constructor is a better choice ?

FlowerWrong commented 2 years ago

Hi! Any update for this issue, bros?

madeindjs commented 2 years ago

I totally forgot about it, sorry. I'll merge it soon and publish a new version

madeindjs commented 2 years ago

@FlowerWrong , I reverted the PR who seem to fix this issue (#4). I'm not sure it's a good way to fix it.

tayanefernandes commented 1 year ago

Any updates about this issue??

madeindjs commented 1 year ago

@tayanefernandes , sadly not... Feel free to publish a PR to fix it, i'll be glad to publish a new version

dlpigpen commented 1 year ago
@OnWorkerEvent('job:success')
  onJobSuccess({ job }: WorkerEventMap['job:success']) {
    this.logger.debug(`job #${job.id} with payload ${job.payload} finished`);
  }

The task is done but the log does not trace out. Could you publish a new PR?

madeindjs commented 1 year ago

fixed on v0.3.1.