From 0a5b7527b8451d882de34144a4e1713747eef75a Mon Sep 17 00:00:00 2001 From: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Date: Thu, 27 Oct 2022 17:52:02 -0600 Subject: [PATCH 1/2] add default run health check as script --- healthUtil.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/healthUtil.ts b/healthUtil.ts index d332fe5..8c8b5db 100644 --- a/healthUtil.ts +++ b/healthUtil.ts @@ -19,6 +19,15 @@ export const checkWebUrl: ( }; }; +export const runHealthScript = ({command, args}: { command: string, args: string[] }) => async (effects: Effects, _duration: number): Promise> => { + const res = await effects.runCommand({ command, args }) + if ('result' in res){ + return { result: null } + } else { + return res + } +} + // Ensure the starting duration is pass a minimum export const guardDurationAboveMinimum = ( input: { duration: number; minimumTime: number }, From 8e3438dc5bae0afd204a346063c26775d2cd43db Mon Sep 17 00:00:00 2001 From: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Date: Thu, 27 Oct 2022 17:53:24 -0600 Subject: [PATCH 2/2] add gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file