File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
components/server/src/billing Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { inject, injectable } from "inversify";
17
17
import { BillingModes } from "./billing-mode" ;
18
18
import { EntitlementServiceUBP } from "./entitlement-service-ubp" ;
19
19
import { log } from "@gitpod/gitpod-protocol/lib/util/logging" ;
20
+ import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server" ;
20
21
21
22
export interface MayStartWorkspaceResult {
22
23
hitParallelWorkspaceLimit ?: HitParallelWorkspaceLimit ;
@@ -124,8 +125,14 @@ export class EntitlementServiceImpl implements EntitlementService {
124
125
const billingMode = await this . billingModes . getBillingMode ( userId , organizationId ) ;
125
126
switch ( billingMode . mode ) {
126
127
case "none" :
127
- // when payment is disabled users can do everything
128
- return true ;
128
+ const disable_set_timeout = await getExperimentsClientForBackend ( ) . getValueAsync (
129
+ "disable_set_timeout" ,
130
+ false ,
131
+ {
132
+ gitpodHost : process . env . GITPOD_HOST ,
133
+ } ,
134
+ ) ;
135
+ return ! disable_set_timeout ;
129
136
case "usage-based" :
130
137
return this . ubp . maySetTimeout ( userId , organizationId ) ;
131
138
}
You can’t perform that action at this time.
0 commit comments