Skip to content

Commit

Permalink
fix(server): add environment variable to control bucket domain Create…
Browse files Browse the repository at this point in the history
… task switch (#1836)

Co-authored-by: HUAHUAI23 <lim@outlook.com>
  • Loading branch information
HUAHUAI23 and HUAHUAI23 authored Feb 2, 2024
1 parent 17811c4 commit 3e17727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions server/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export class ServerConfig {
return process.env.DISABLED_GATEWAY_TASK === 'true'
}

static get DISABLED_BUCKET_DOMAIN_TASK() {
return process.env.DISABLED_BUCKET_DOMAIN_TASK === 'true'
}

static get DISABLED_TRIGGER_TASK() {
return process.env.DISABLED_TRIGGER_TASK === 'true'
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/gateway/bucket-domain-task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class BucketDomainTaskService {

@Cron(CronExpression.EVERY_SECOND)
async tick() {
if (ServerConfig.DISABLED_GATEWAY_TASK) return
if (ServerConfig.DISABLED_BUCKET_DOMAIN_TASK) return

// Phase `Creating` -> `Created`
this.handleCreatingPhase().catch((err) => {
Expand Down

0 comments on commit 3e17727

Please sign in to comment.