Skip to content

Commit

Permalink
feat: More readable compiling schema log message
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jun 27, 2019
1 parent c69ef23 commit 246805b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cubejs-server-core/core/CompilerApi.js
Expand Up @@ -21,7 +21,7 @@ class CompilerApi {
compilerVersion += `_${crypto.createHash('md5').update(JSON.stringify(files)).digest("hex")}`;
}
if (!this.compilers || this.compilerVersion !== compilerVersion) {
this.logger('Compiling schema', { version: compilerVersion });
this.logger(this.compilers ? 'Recompiling schema' : 'Compiling schema', { version: compilerVersion });
// TODO check if saving this promise can produce memory leak?
this.compilers = PrepareCompiler.compile(this.repository, {
adapter: this.dbType,
Expand Down
3 changes: 2 additions & 1 deletion packages/cubejs-server-core/core/index.js
Expand Up @@ -131,7 +131,8 @@ class CubejsServerCore {
msg === 'Orchestrator error' ||
msg === 'Internal Server Error' ||
msg === 'User Error' ||
msg === 'Compiling schema'
msg === 'Compiling schema' ||
msg === 'Recompiling schema'
) {
this.event(msg, { error: params.error });
}
Expand Down

0 comments on commit 246805b

Please sign in to comment.