We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello First of all, thanks for coding this provider.
In app/controllers/http, i have the following controller:
'use strict' const Bull = use('Rocketseat/Bull') const RegisterDashboardJob = use('App/Jobs/RegisterDashboard') class RegisterController { async store({ request, response }) { const data = { "companyName": "test", "firstName": "test", "lastName": "1", "telephone": "0349208926", "email": "test@gmail.com", "password": "123456", "productSelect": [], "posCategory": 1, "gender": 1, "username": "test@gmail.com", "name": "test account", "companyDomain": "test-46" } Bull.add(RegisterDashboardJob.key, data) return response.status(201).json({ message: `Register job added to queue` }) } } module.exports = RegisterController
In app/Jobs/RegisterDashboard i have the following:
'use strict' const { createSyncDashboardDatabase, } = use('App/Services/SyncDatabase') const _ = use('lodash'); const Job = use('App/Models/v2/Job') const {simpleStringify} = use('App/Helpers/Utils') class RegisterDashboard { static get key () { return 'register-dashboard-job' } async handle (job) { const { data } = job let dataInsert = { 'queue': RegisterDashboard.key, 'payload': simpleStringify(data), 'response': '', 'email': data.email, 'status': '' } await createSyncDashboardDatabase(data).then((dashboard) => { Job.create(dataInsert) }).catch(e => { dataInsert.response = simpleStringify(e) dataInsert.status = 500 Job.create(dataInsert) }) } } module.exports = RegisterDashboard
When debug Job data transmitted is no data that controller transmits. Could you please help me? Maybe I'm missing something here...
Data from Job be like
{ "name":"__default__", "_progress":0, "delay":0, "timestamp":1593077938333, "attemptsMade":0, "id":"27", "processedOn":1593077940335 }
Thanks
The text was updated successfully, but these errors were encountered:
Hi @phucnguyen1605 !! It seems ok.
I made the structure like as yours and it worked fine!
Did you open the bull board? Did you see anything stranger?
Sorry, something went wrong.
Hey, I will close this issue for lack of current interactions. Feel free to open it again if necessary.
No branches or pull requests
Hello
First of all, thanks for coding this provider.
In app/controllers/http, i have the following controller:
In app/Jobs/RegisterDashboard i have the following:
When debug Job data transmitted is no data that controller transmits.
Could you please help me? Maybe I'm missing something here...
Data from Job be like
Thanks
The text was updated successfully, but these errors were encountered: