Rocketseat / adonis-bull

The easiest way to start using an asynchronous job queue with AdonisJS. Ready for Adonis v5 ⚡️
MIT License
310 stars 57 forks source link

Migrate to adonis 5 #39

Closed RodolfoSilva closed 3 years ago

RodolfoSilva commented 4 years ago
RodolfoSilva commented 4 years ago

@HigoRibeiro @diego3g @pellizzetti

I don't know why, but the coveralls keep sending this message:

yarn run v1.22.5
$ nyc npm test && nyc report --reporter=text-lcov | coveralls
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1599444753514-0.44342638581364535/node but npm is using /opt/hostedtoolcache/node/12.18.3/x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> @rocketseat/adonis-bull@0.2.2 pretest /home/runner/work/adonis-bull/adonis-bull
> npm run lint

npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1599444753514-0.44342638581364535/node but npm is using /opt/hostedtoolcache/node/12.18.3/x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> @rocketseat/adonis-bull@0.2.2 lint /home/runner/work/adonis-bull/adonis-bull
> eslint . --ext=.ts

> @rocketseat/adonis-bull@0.2.2 test /home/runner/work/adonis-bull/adonis-bull
> node japaFile.js

Provider
  ✓ BullProvider (70ms)

Bull
  ✓ should add a new job (13ms)
  ✓ should add a new job with events inside Job class (1ms)
  ✓ should schedule a new job (9ms)
  ✓ shouldn't schedule when time is invalid (1ms)

 PASSED 

total         : 5
passed        : 5
duration      : 96ms
-----------------------|---------|----------|---------|---------|-------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-----------------------|---------|----------|---------|---------|-------------------
All files              |   75.81 |    56.52 |      50 |   79.66 |                   
 adonis-bull           |     100 |      100 |     100 |     100 |                   
  japaFile.js          |     100 |      100 |     100 |     100 |                   
 adonis-bull/providers |   90.91 |    66.67 |   66.67 |   90.91 |                   
  BullProvider.ts      |   90.91 |    66.67 |   66.67 |   90.91 | 30                
 adonis-bull/src       |   70.21 |    52.94 |   44.44 |      75 |                   
  BullManager.ts       |   70.21 |    52.94 |   44.44 |      75 | 60-77,97,113      
-----------------------|---------|----------|---------|---------|-------------------

/home/runner/work/adonis-bull/adonis-bull/node_modules/coveralls/bin/coveralls.js:19
      throw err;
      ^
Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true}
(Use `node --trace-uncaught ...` to show where the exception was thrown)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
##[error]Process completed with exit code 1.

Can anyone help me with this? I think may need to adjust some settings.

zulfi007 commented 4 years ago

I tried to complie your code but getting BullBoard empty.
I am getting type error at BullManager.js:72:39: Cannot read property 'listen' of undefined .

RodolfoSilva commented 4 years ago

@zulfi007 can you provide a repo with a simple implementation where I can get this error?

zulfi007 commented 4 years ago

@zulfi007 can you provide a repo with a simple implementation where I can get this error?

https://github.com/zulfi007/adonis-bull-test.git

also look into typescript typing error while import Bull from '@ioc:Rocketseat/Bull' . I have ignored then via ts-ignore .

HigoRibeiro commented 4 years ago

First, thanks @RodolfoSilva for your contribution.

I'll look at this throughout the week. 🚀

RodolfoSilva commented 4 years ago

Thanks @HigoRibeiro

LeCoupa commented 3 years ago

Do we have an ETA to merge this? 🙂

waldandrade commented 3 years ago

@RodolfoSilva falta muito para disponibilizar essa adaptação? rsrsrs

RodolfoSilva commented 3 years ago

@waldandrade eu acredito que a Rocketseet abandonou esse projeto, ou tem andado bastante ocupada com outras demandas e não tem sobrado tempo para olhar a lib(Mais provável).

Ae agora só eles para te responder mesmo.

waldandrade commented 3 years ago

@RodolfoSilva obrigado pela resposta rápida! :D Conhece alguma outra opção de scheduler para AdonisV5?

RodolfoSilva commented 3 years ago

@waldandrade eu acabei criando um provider dentro do projeto com o Bull mesmo. Mas vc pode criar um arquivo na pasta start, utilizando o comando node ace make:prldfile scheduler e utilizar o node-cron nele se for algo simples.

HigoRibeiro commented 3 years ago

Fala galera, beleza? Cara não abandonamos o projeto não!

Um pouco de várias coisas contribuíram para ainda não dar o merge!! @RodolfoSilva será que conseguimos conversar no Discord? Higo Ribeiro#5513

Se não for possível eu te mando um e-mail, abraços

waldandrade commented 3 years ago

@HigoRibeiro que bom! Espero que dê tudo certo.

waldandrade commented 3 years ago

@RodolfoSilva realmente estou precisando utilizar algumas funções coisas mais complexas. Teria como me ensinar como configurar esta lib no Adonis5?

RodolfoSilva commented 3 years ago

@waldandrade bom dia, conversei com @HigoRibeiro ontem. Alinhamos algumas coisas, acredito que nos próximos dias teremos uma release. Só preciso conseguir um tempo aqui para fazer esses ajustes.

LeCoupa commented 3 years ago

Great @RodolfoSilva waiting for the release :)

rubenmoya commented 3 years ago

Is there anything missing to have this merged? How can I help?

ammezie commented 3 years ago

Any ETA as to when this can be merged?

ashokgelal commented 3 years ago

I needed this package in one of the apps I'm working on and published it as a separate npm package as a stop gap solution. If you are in the same situation, please help yourself: https://www.npmjs.com/package/@ashokgelal/adonis-bull

I'll remove the package once this merge gets approved and published. Thanks a lot to @RodolfoSilva for this migration. You are a hero :)

LeCoupa commented 3 years ago

Thanks @ashokgelal, I will use your package. Any ETA for this PR to be merged? Many companies rely on it. :/

RodolfoSilva commented 3 years ago

Thanks @ashokgelal 👍🏽

fhugoduarte commented 3 years ago

Hi @RodolfoSilva :hugs:

First thx for the contrib! We are reviewing this PR, but we have some problems to make it work, as soon as we finish. We are doing our best to make the merger happen as soon as possible

fhugoduarte commented 3 years ago

The work done so far has been very nice! We need to make some small adjustments to launch the alpha version, we will publish soon.

So, we will need your help to test this new version when it becomes available. You can follow the progress on this issue: #50