This commit is contained in:
parent
f828ca4491
commit
cb51a4136f
167 changed files with 21485 additions and 21212 deletions
|
@ -1,28 +1,9 @@
|
|||
/**
|
||||
* Config source: https://git.io/JemcF
|
||||
*
|
||||
* Feel free to let us know via PR, if you find something broken in this config
|
||||
* file.
|
||||
*/
|
||||
import env from '#start/env'
|
||||
import { defineConfig } from '@adonisjs/redis'
|
||||
import { InferConnections } from '@adonisjs/redis/types'
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { redisConfig } from '@adonisjs/redis/build/config'
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Following is the configuration used by the Redis provider to connect to
|
||||
| the redis server and execute redis commands.
|
||||
|
|
||||
| Do make sure to pre-define the connections type inside `contracts/redis.ts`
|
||||
| file for AdonisJs to recognize connections.
|
||||
|
|
||||
| Make sure to check `contracts/redis.ts` file for defining extra connections
|
||||
*/
|
||||
export default redisConfig({
|
||||
connection: Env.get('REDIS_CONNECTION'),
|
||||
const redisConfig = defineConfig({
|
||||
connection: 'main',
|
||||
|
||||
connections: {
|
||||
/*
|
||||
|
@ -35,12 +16,21 @@ export default redisConfig({
|
|||
| redis driver.
|
||||
|
|
||||
*/
|
||||
local: {
|
||||
host: Env.get('REDIS_HOST'),
|
||||
port: Env.get('REDIS_PORT'),
|
||||
password: Env.get('REDIS_PASSWORD', ''),
|
||||
main: {
|
||||
host: env.get('REDIS_HOST'),
|
||||
port: env.get('REDIS_PORT'),
|
||||
password: env.get('REDIS_PASSWORD', ''),
|
||||
db: 0,
|
||||
keyPrefix: '',
|
||||
retryStrategy(times) {
|
||||
return times > 10 ? null : times * 50
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
export default redisConfig
|
||||
|
||||
declare module '@adonisjs/redis/types' {
|
||||
export interface RedisConnections extends InferConnections<typeof redisConfig> {}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue