Configuration options for the jobs controller
Class decorator
import { JobsController, Define, Every } from 'agenda';
@JobsController({ namespace: 'notifications' })
class NotificationJobs {
@Define()
async sendPush(job: Job<{ userId: string }>) {
// Handle push notification
}
@Every('5 minutes')
async checkPending(job: Job) {
// Check for pending notifications
}
}
Class decorator that marks a class as containing job handlers.