From aa670dea72aad62bcc073a5340ad019b9c24e8c0 Mon Sep 17 00:00:00 2001 From: Joanna Jarmulska Date: Fri, 16 Dec 2016 10:36:39 +0100 Subject: [PATCH] hk #56 fix Now hk throws warning if directory is missing --- components/hk/hk.q | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/hk/hk.q b/components/hk/hk.q index 759beab..b455c07 100644 --- a/components/hk/hk.q +++ b/components/hk/hk.q @@ -140,6 +140,8 @@ system"l ",getenv[`EC_QSL_PATH],"/sl.q"; /-----------------------------------------------------------------------------/ .hk.p.processOneTask:{[taskDef] plugin:` sv (`.hk.plug;taskDef[`action]); + if[0~count key taskDef[`dir]; + .log.warn[`hk]"Given directory ",string[taskDef[`dir]], " is missing. Hk will skip this task. Please check if process ", string[taskDef[`proc]], " was properly started";:(::)]; files:.os.find[taskDef `dir;taskDef `age;taskDef `pattern]; if[0~count files;.log.info[`hk] "no files found matching pattern ",(string taskDef `pattern),", skipping task ",string taskDef `action;:(::)]; .log.info[`hk] "Running ",string[plugin], " for ", string[taskDef[`proc]], " on ",string[count files], " files";