-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
bug/needs-infoMore information is needed for reproductionMore information is needed for reproduction
Description
What's not working?
Hi, I believe there are syntax errors in the highlighted lines of code within this section of the documentation.
I believe that this:
import { later, jobs } from 'src/lib/jobs'
export const NightlyReportJob = jobs.createJob({
queue: 'default',
perform: async () => {
await DailyUsageReport.run()
await later(NightlyReportJob, [], {
wait: new Date(new Date().getTime() + 86_400 * 1000),
})
},
})
Should be this, since wait expects a number instead of a Date:
import { later, jobs } from 'src/lib/jobs'
export const NightlyReportJob = jobs.createJob({
queue: 'default',
perform: async () => {
await DailyUsageReport.run()
await later(NightlyReportJob, [], {
wait: 86_400 * 1000,
})
},
})
I'm pretty sure this is correct because, while trying to debug another issue, I attempted to pass along a date to wait and received an error.
How do we reproduce the bug?
No response
What's your environment? (If it applies)
Are you interested in working on this?
- I'm interested in working on this
Metadata
Metadata
Assignees
Labels
bug/needs-infoMore information is needed for reproductionMore information is needed for reproduction