Add job queue; e-mail sending; password reset support
This commit is contained in:
35
config/jobs.config.js
Normal file
35
config/jobs.config.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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',
|
||||
],
|
||||
|
||||
// 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'],
|
||||
},
|
||||
|
||||
// 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)
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = exports = jobs_config
|
||||
17
config/redis.config.js
Normal file
17
config/redis.config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Configuration for Flitter-Redis.
|
||||
* You can access the IORedis instance on the redis service:
|
||||
* app.di().service('redis').client()
|
||||
*/
|
||||
const redis_config = {
|
||||
|
||||
// How to connect to the server
|
||||
// See IORedis docs for config options:
|
||||
// https://github.com/luin/ioredis#connect-to-redis
|
||||
server: {
|
||||
host: env('REDIS_HOST', 'localhost'),
|
||||
port: env('REDIS_PORT', 6379),
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = exports = redis_config
|
||||
12
config/smtp.config.js
Normal file
12
config/smtp.config.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const smtp_config = {
|
||||
host: env('SMTP_HOST', 'localhost'),
|
||||
port: env('SMTP_PORT', 587),
|
||||
secure: env('SMTP_SECURE', false),
|
||||
default_sender: env('SMTP_DEFAULT_SENDER'),
|
||||
auth: {
|
||||
user: env('SMTP_USER'),
|
||||
pass: env('SMTP_PASS'),
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = exports = smtp_config
|
||||
Reference in New Issue
Block a user