-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: update shutdown process #1813
Conversation
✅ Deploy Preview for brilliant-pasca-3e80ec ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
connectorApp: Promise<ConnectorApp> | ||
tigerbeetle: Promise<TigerbeetleClient> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adds these services so they are properly typed when doing container.use
|
||
export interface AppContextData { | ||
logger: Logger | ||
closeEmitter: EventEmitter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't used
await tigerbeetle.destroy() | ||
tigerbeetle.destroy() | ||
const redis = await container.use('redis') | ||
await redis.disconnect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not async functions
@@ -37,6 +37,6 @@ export class OutgoingIlpPlugin implements IlpPlugin { | |||
} | |||
|
|||
export interface IlpPluginOptions { | |||
sourceAccount: LiquidityAccount | |||
sourceAccount: ConnectorAccount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updating to the the correct type
@@ -158,12 +152,12 @@ export class App { | |||
}) | |||
|
|||
// Setup Apollo | |||
this.apolloServer = new ApolloServer({ | |||
const apolloServer = new ApolloServer({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.apolloServer wasn't used outside of this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup! It'll probably give me merge conflicts 🙃
Changes proposed in this pull request
index.ts
app.shutdown
function to properly close all running servers (in bothauth
andbackend
packages)closeEmitter
Context
Related to: #1805 (comment)
Checklist
fixes #number