Skip to content

Commit

Permalink
fix(core): Fix issue that worker and webhook service close directly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
janober authored Feb 11, 2023
1 parent 59f5c42 commit 3396556
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cli/src/commands/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export class Webhook extends BaseCommand {
async run() {
await new WebhookServer().start();
this.logger.info('Webhook listener waiting for requests.');

// Make sure that the process does not close
await new Promise(() => {});
}

async catch(error: Error) {
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/commands/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ export class Worker extends BaseCommand {
}
});
}

// Make sure that the process does not close
await new Promise(() => {});
}

async catch(error: Error) {
Expand Down

0 comments on commit 3396556

Please sign in to comment.