Skip to content

Commit 31b9a82

Browse files
committed
fix
1 parent b1ff863 commit 31b9a82

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

components/server/ee/src/server.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
1212
import { GitLabApp } from "./prebuilds/gitlab-app";
1313
import { BitbucketApp } from "./prebuilds/bitbucket-app";
1414
import { GithubApp } from "./prebuilds/github-app";
15-
import { SnapshotService } from "./workspace/snapshot-service";
1615
import { GitHubEnterpriseApp } from "./prebuilds/github-enterprise-app";
1716
import { BitbucketServerApp } from "./prebuilds/bitbucket-server-app";
1817

@@ -21,17 +20,10 @@ export class ServerEE<C extends GitpodClient, S extends GitpodServer> extends Se
2120
@inject(GitLabApp) protected readonly gitLabApp: GitLabApp;
2221
@inject(BitbucketApp) protected readonly bitbucketApp: BitbucketApp;
2322
@inject(BitbucketServerApp) protected readonly bitbucketServerApp: BitbucketServerApp;
24-
@inject(SnapshotService) protected readonly snapshotService: SnapshotService;
2523
@inject(GitHubEnterpriseApp) protected readonly gitHubEnterpriseApp: GitHubEnterpriseApp;
2624

2725
public async init(app: express.Application) {
2826
await super.init(app);
29-
30-
if (!this.config.completeSnapshotJob?.disabled) {
31-
// Start Snapshot Service
32-
log.info("Starting snapshot completion job...");
33-
await this.snapshotService.start();
34-
}
3527
}
3628

3729
protected async registerRoutes(app: express.Application): Promise<void> {

components/server/src/server.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import { LivenessController } from "./liveness/liveness-controller";
5353
import { IamSessionApp } from "./iam/iam-session-app";
5454
import { LongRunningMigrationService } from "@gitpod/gitpod-db/lib/long-running-migration/long-running-migration";
5555
import { API } from "./api/server";
56+
import { SnapshotService } from "./workspace/snapshot-service";
5657

5758
@injectable()
5859
export class Server<C extends GitpodClient, S extends GitpodServer> {
@@ -82,6 +83,7 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
8283
@inject(PeriodicDbDeleter) protected readonly periodicDbDeleter: PeriodicDbDeleter;
8384
@inject(WebhookEventGarbageCollector) protected readonly webhookEventGarbageCollector: WebhookEventGarbageCollector;
8485
@inject(LongRunningMigrationService) protected readonly migrationService: LongRunningMigrationService;
86+
@inject(SnapshotService) protected readonly snapshotService: SnapshotService;
8587

8688
@inject(BearerAuth) protected readonly bearerAuth: BearerAuth;
8789

@@ -310,6 +312,12 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
310312
.start()
311313
.catch((err) => log.error("webhook-event-gc: error during startup", err));
312314

315+
if (!this.config.completeSnapshotJob?.disabled) {
316+
// Start Snapshot Service
317+
log.info("Starting snapshot completion job...");
318+
await this.snapshotService.start();
319+
}
320+
313321
this.app = app;
314322

315323
log.info("server initialized.");

0 commit comments

Comments
 (0)