Skip to content

Commit

Permalink
chore(sys-server): add logs;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Jan 23, 2022
1 parent 79a4a34 commit 28938ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 7 additions & 1 deletion packages/system-server/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: Maslow<wangfugen@126.com>
* @Date: 2021-07-30 10:30:29
* @LastEditTime: 2022-01-20 13:52:36
* @LastEditTime: 2022-01-23 19:46:34
* @Description:
*/

Expand Down Expand Up @@ -58,8 +58,14 @@ process.on('SIGTERM', gracefullyExit)
process.on('SIGINT', gracefullyExit)

async function gracefullyExit() {
logger.info('exiting: removing system extension service')
await ServiceDriver.create().removeService({ appid: Constants.SYSTEM_EXTENSION_APPID } as any)
logger.info('exiting: system extension service has been removed')

logger.info('exiting: closing db connection')
await DatabaseAgent.sys_accessor.close()
logger.info('exiting: db connection has been closed')

server.close(async () => {
logger.info('process gracefully exited!')
process.exit(0)
Expand Down
4 changes: 0 additions & 4 deletions packages/system-server/src/lib/service-driver/kubernetes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ export class KubernetesServiceDriver implements ServiceDriverInterface {
],
ports: [{ containerPort: 8000 }],
resources: {
// requests: {
// memory: `${memoryLimit}Mi`,
// cpu: `${cpuShares}m`
// },
limits: {
memory: `${memoryLimit}Mi`,
cpu: `${cpuShares}m`
Expand Down

0 comments on commit 28938ea

Please sign in to comment.