Skip to content

Commit d397c25

Browse files
committed
Fix #53 initial summary cache
1 parent e5d93c7 commit d397c25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/ExpressServer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export default class ExpressServer {
5757
expressServer.app.use((req, res, next) => next(createError(404)));// catch 404 and forward to error handler
5858
expressServer.app.use(expressServer.errorHandlerMiddleware.bind(this));// error handler
5959

60+
// build initial cache
61+
await this.summaryService.cacheGetWeekSummary({})
62+
6063
expressServer.listeningServer = await expressServer.app.listen(expressServer.port);
6164
expressServer.logger.info(`Bot ${expressServer.version} listening on ${expressServer.port} with health on ${HEALTH_ENDPOINT}`);
6265
return expressServer.listeningServer;

0 commit comments

Comments
 (0)