Skip to content

Commit

Permalink
hk #56 fix
Browse files Browse the repository at this point in the history
Now hk throws warning if directory is missing
  • Loading branch information
joannajarmulska committed Dec 16, 2016
1 parent f032140 commit aa670de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/hk/hk.q
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit aa670de

Please sign in to comment.