File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
12
12
import { GitLabApp } from "./prebuilds/gitlab-app" ;
13
13
import { BitbucketApp } from "./prebuilds/bitbucket-app" ;
14
14
import { GithubApp } from "./prebuilds/github-app" ;
15
- import { SnapshotService } from "./workspace/snapshot-service" ;
16
15
import { GitHubEnterpriseApp } from "./prebuilds/github-enterprise-app" ;
17
16
import { BitbucketServerApp } from "./prebuilds/bitbucket-server-app" ;
18
17
@@ -21,17 +20,10 @@ export class ServerEE<C extends GitpodClient, S extends GitpodServer> extends Se
21
20
@inject ( GitLabApp ) protected readonly gitLabApp : GitLabApp ;
22
21
@inject ( BitbucketApp ) protected readonly bitbucketApp : BitbucketApp ;
23
22
@inject ( BitbucketServerApp ) protected readonly bitbucketServerApp : BitbucketServerApp ;
24
- @inject ( SnapshotService ) protected readonly snapshotService : SnapshotService ;
25
23
@inject ( GitHubEnterpriseApp ) protected readonly gitHubEnterpriseApp : GitHubEnterpriseApp ;
26
24
27
25
public async init ( app : express . Application ) {
28
26
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
- }
35
27
}
36
28
37
29
protected async registerRoutes ( app : express . Application ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ import { LivenessController } from "./liveness/liveness-controller";
53
53
import { IamSessionApp } from "./iam/iam-session-app" ;
54
54
import { LongRunningMigrationService } from "@gitpod/gitpod-db/lib/long-running-migration/long-running-migration" ;
55
55
import { API } from "./api/server" ;
56
+ import { SnapshotService } from "./workspace/snapshot-service" ;
56
57
57
58
@injectable ( )
58
59
export class Server < C extends GitpodClient , S extends GitpodServer > {
@@ -82,6 +83,7 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
82
83
@inject ( PeriodicDbDeleter ) protected readonly periodicDbDeleter : PeriodicDbDeleter ;
83
84
@inject ( WebhookEventGarbageCollector ) protected readonly webhookEventGarbageCollector : WebhookEventGarbageCollector ;
84
85
@inject ( LongRunningMigrationService ) protected readonly migrationService : LongRunningMigrationService ;
86
+ @inject ( SnapshotService ) protected readonly snapshotService : SnapshotService ;
85
87
86
88
@inject ( BearerAuth ) protected readonly bearerAuth : BearerAuth ;
87
89
@@ -310,6 +312,12 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
310
312
. start ( )
311
313
. catch ( ( err ) => log . error ( "webhook-event-gc: error during startup" , err ) ) ;
312
314
315
+ if ( ! this . config . completeSnapshotJob ?. disabled ) {
316
+ // Start Snapshot Service
317
+ log . info ( "Starting snapshot completion job..." ) ;
318
+ await this . snapshotService . start ( ) ;
319
+ }
320
+
313
321
this . app = app ;
314
322
315
323
log . info ( "server initialized." ) ;
You can’t perform that action at this time.
0 commit comments