-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dúvidas de uso dos Jobs #19
Comments
Fala @kennedyrs ! |
Outra dúvida, qual seria a melhor estratégia para acionar um job assim que a aplicação iniciar?
|
Cria um ServiceProvider com Ah, tem que registrar o provider no array const path = require('path')
const providers = [
...
'@rocketseat/adonis-bull/providers/Bull',
path.join(__dirname, '..', 'providers', 'SeuProvider'),
] |
Hey @kennedyrs, this issue was closed because it was not following the guidelines described here. While contributing or interacting in any way in this project, refrain from using any language other than English. |
Estou tentanto fazer isto mas no Provider em que função corro os Exemplo: boot() {
const Bull = this.app.use('Rocketseat/Bull');
const Job = this.app.use('App/Jobs/Job');
Bull.add(Job.key, { attempts: 3, repeat: { cron: '0 0 * * *' } });
} |
Eu tenho uma dúvida quanto ao Bull, dentro do método handle, como eu digo que algo não deu certo?
Por exemplo, dependendo da resposta de uma API, quero que a fila tente executar a ação novamente mais tarde.
Seria só lançar uma Exception?
The text was updated successfully, but these errors were encountered: