45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
/*
|
|
* Job Queue Configuration
|
|
* -------------------------------------------------
|
|
* This file is provided by flitter-jobs and defines the job
|
|
* queues available to the application. It also specifies the
|
|
* workers and which queues they process.
|
|
*
|
|
* You can start a worker process by running the command:
|
|
* ./flitter worker <worker name>
|
|
*/
|
|
const jobs_config = {
|
|
|
|
// Array of queues by name
|
|
queues: [
|
|
'mailer',
|
|
'password_resets',
|
|
'notifications',
|
|
'verifications',
|
|
],
|
|
|
|
// Mapping of worker name => worker config
|
|
workers: {
|
|
|
|
// The name of the worker is "main"
|
|
main: {
|
|
// This worker will process these queues
|
|
queues: ['mailer', 'password_resets', 'notifications', 'verifications'],
|
|
},
|
|
|
|
// You can have many workers, and multiple workers can
|
|
// process the same queue. Likewise, you can have multiple
|
|
// worker processes of the same type.
|
|
// (e.g. you can have two "main" workers)
|
|
},
|
|
|
|
connector: {
|
|
enabled: env('JOB_QUEUE_CONNECTOR', false),
|
|
mount: env('JOB_QUEUE_CONNECTOR_MOUNT', '/job_queue_api'),
|
|
secret: env('JOB_QUEUE_CONNECTOR_SECRET'),
|
|
},
|
|
|
|
}
|
|
|
|
module.exports = exports = jobs_config
|