diff --git a/code/processes/segmentedtickerplant.q b/code/processes/segmentedtickerplant.q index 796fa45b9..649cb1bd1 100644 --- a/code/processes/segmentedtickerplant.q +++ b/code/processes/segmentedtickerplant.q @@ -28,12 +28,12 @@ tablelist:{.stpps.t} // subscribers who want to replay need this info subdetails:{[tabs;instruments] - `schemalist`logfilelist`rowcounts`date`logdir!(.ps.subscribe\:[tabs;instruments];.stplg.replaylog[tabs];tabs#.stplg `rowcount;(.eodtime `d);`$getenv`KDBTPLOG) + `schemalist`logfilelist`rowcounts`date`logdir!(.ps.subscribe\:[tabs;instruments];.stplg.replaylog[tabs];tabs#.stplg `rowcount;(.eodtime `d);.stplg.kdbtplog) } // Generate table and schema information and set up default table UPD functions generateschemas:{ - .stpps.init[tables[] except `currlog]; + .stpps.init[tables[] except `currlog`heartbeat`logmsg`svrstoload]; .stpps.attrstrip[.stpps.t]; // Table UPD functions attach the current timestamp by default, if STP is chained these do nothing @@ -59,8 +59,11 @@ setup:{[batch] .stplg.updmsg:.stplg.upd[batch]; .stplg.ts:.stplg.zts[batch]; .u.upd:.stpps.upd[chainmode]; - .dotz.set[`.z.ts;.stpps.zts[chainmode]]; - + .dotz.set[`.z.ts; + {[f;x] @[;x;()]each f} + (@[value;.dotz.getcommand[`.z.ts];{{}}]; + .stpps.zts[chainmode])]; + // Error mode - error trap UPD to write failed updates to separate TP log if[.stplg.errmode; .stp.upd:.u.upd; diff --git a/code/segmentedtickerplant/stplog.q b/code/segmentedtickerplant/stplog.q index b2651bffb..a6eb92392 100644 --- a/code/segmentedtickerplant/stplog.q +++ b/code/segmentedtickerplant/stplog.q @@ -14,7 +14,7 @@ errorlogname:@[value;`.stplg.errorlogname;`segmentederrorlogfile] // Create stp log directory // Log structure `:stplogs/date/tabname_time createdld:{[name;date] - if[not count dir:hsym `$getenv[`KDBTPLOG];.lg.e[`stp;"log directory not defined"];exit 1]; + if[not count dir:hsym .stplg.kdbtplog;.lg.e[`stp;"log directory not defined"];exit 1]; .os.md dir; .os.md .stplg.dldir:` sv dir,`$raze/[string name,"_",date]; }; diff --git a/config/settings/segmentedtickerplant.q b/config/settings/segmentedtickerplant.q index 72c28bda6..7e374fedc 100644 --- a/config/settings/segmentedtickerplant.q +++ b/config/settings/segmentedtickerplant.q @@ -8,6 +8,7 @@ errmode:1b; // Enable error mode for STP batchmode:`defaultbatch; // [memorybatch|defaultbatch|immediate] replayperiod:`day // [period|day|prior] customcsv:hsym first .proc.getconfigfile["stpcustom.csv"]; // Location for custom logging mode csv +kdbtplog:`$getenv`KDBTPLOG; \d .proc loadcommoncode:0b // do not load common code