From 3f4ba4c50cd2b352dc556e59c8d1fb783a1c0230 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 12 Jan 2022 10:27:34 +0100 Subject: [PATCH] try fork --- backend/src/webhook/github.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/webhook/github.ts b/backend/src/webhook/github.ts index e0887c543..316a9c0d3 100644 --- a/backend/src/webhook/github.ts +++ b/backend/src/webhook/github.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line camelcase -import { spawn } from 'child_process' +import { fork } from 'child_process' import path from 'path' import CONFIG from '../config' @@ -18,7 +18,7 @@ export const githubWebhook = async (req: any, res: any): Promise => { console.log(payload) if (payload.ref === `refs/heads/${CONFIG.WEBHOOK_GITHUB_BRANCH}`) { - const child = spawn(path.join(__dirname, '../../../deployment/bare_metal/start.sh'), [ + const child = fork(path.join(__dirname, '../../../deployment/bare_metal/start.sh'), [ CONFIG.WEBHOOK_GITHUB_BRANCH, ]) // detach process to allow killing of parent process in the update script