-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(schedular-service and video-conferencing-service): update README…
….md (#277)
- Loading branch information
1 parent
f7f93e2
commit 1257784
Showing
20 changed files
with
507 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './scheduler.pg.datasource'; | ||
export * from './schedular.cache.datasource'; |
32 changes: 32 additions & 0 deletions
32
sandbox/scheduler-example/src/datasources/schedular.cache.datasource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import {inject, lifeCycleObserver, LifeCycleObserver} from '@loopback/core'; | ||
import {juggler} from '@loopback/repository'; | ||
|
||
const config = { | ||
name: 'AuthCache', | ||
connector: 'kv-redis', | ||
url: '', | ||
host: process.env.REDIS_HOST, | ||
port: process.env.REDIS_PORT, | ||
password: process.env.REDIS_PASSWORD, | ||
db: process.env.REDIS_DB, | ||
}; | ||
|
||
// Observe application's life cycle to disconnect the datasource when | ||
// application is stopped. This allows the application to be shut down | ||
// gracefully. The `stop()` method is inherited from `juggler.DataSource`. | ||
// Learn more at https://loopback.io/doc/en/lb4/Life-cycle.html | ||
@lifeCycleObserver('datasource') | ||
export class AuthCacheDataSource | ||
extends juggler.DataSource | ||
implements LifeCycleObserver | ||
{ | ||
static dataSourceName = 'AuthCache'; | ||
static readonly defaultConfig = config; | ||
|
||
constructor( | ||
@inject('datasources.config.AuthCache', {optional: true}) | ||
dsConfig: object = config, | ||
) { | ||
super(dsConfig); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.