Skip to content

Instantly share code, notes, and snippets.

View fmoessle's full-sized avatar

Florian Streise fmoessle

View GitHub Profile
import { someFunction } from '../../../utils/file-with-stuff-i-need'
const { disallow } = require('feathers-hooks-common')
module.exports = {
before: {
all: [],
find: [],
get: [
disallow()
],
create: [
sendRatingMailQueue.process(async job => {
await sendRatingMailTo(job.data.email)
})
import Queue from 'bull'
const sendRatingMailQueue = new Queue('sendRatingMail', {
redis: {
host: '127.0.0.1',
port: 6379
}
})
const data = {
email: 'foo@bar.com'
}
const options = {
delay: 86400000,
attempts: 3
}
sendRatingMailQueue.add(data, options)