From 8c35229cd3ce4a6583128181489655901050151f Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Wed, 18 Sep 2024 19:26:32 -0400 Subject: [PATCH] fix(core): fix powerpack license report and add back remote cache (#27983) ## Current Behavior The remote cache was not being initialized on the new db cache. Powerpack license expiration improperly assumed to be unix timestamp in ms ## Expected Behavior The remote cache is being initialized on the new db cache. Powerpack license expiration shows up properly. ## Related Issue(s) Fixes # --- packages/nx/src/command-line/report/report.ts | 4 +++- packages/nx/src/tasks-runner/task-orchestrator.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/nx/src/command-line/report/report.ts b/packages/nx/src/command-line/report/report.ts index 61ef530b1d815..e8eba85bde679 100644 --- a/packages/nx/src/command-line/report/report.ts +++ b/packages/nx/src/command-line/report/report.ts @@ -103,7 +103,9 @@ export async function reportHandler() { powerpackLicense.workspaceCount } workspace${ powerpackLicense.workspaceCount > 1 ? 's' : '' - } until ${new Date(powerpackLicense.expiresAt).toLocaleDateString()}` + } until ${new Date( + powerpackLicense.expiresAt * 1000 + ).toLocaleDateString()}` ); bodyLines.push(''); diff --git a/packages/nx/src/tasks-runner/task-orchestrator.ts b/packages/nx/src/tasks-runner/task-orchestrator.ts index f10700ac54079..6352d9c71b314 100644 --- a/packages/nx/src/tasks-runner/task-orchestrator.ts +++ b/packages/nx/src/tasks-runner/task-orchestrator.ts @@ -75,10 +75,11 @@ export class TaskOrchestrator { ) {} async run() { - // Init the ForkedProcessTaskRunner + // Init the ForkedProcessTaskRunner, TasksSchedule, and Cache await Promise.all([ this.forkedProcessTaskRunner.init(), this.tasksSchedule.init(), + 'init' in this.cache ? this.cache.init() : null, ]); // initial scheduling