Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions code/segmentedtickerplant/stplog.q
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ init:{[dbname]
.dotz.set[`.z.exit;{
if[not x~0i;.lg.e[`stpexit;"Bad exit!"];:()];
.lg.o[`stpexit;"Exiting process"];

// flushing in memory data to disk during unexpected shutdown when batchmode is set to memorybatch
if[.stplg.batchmode=`memorybatch;
.lg.o[`stpexit;"STP shutdown unexpectedly, batchmode = `memorybatch, therefore flushing any remaining data to the on-disk log file"];
.stplg.zts.memorybatch[];
.lg.o[`stpexit; "Complete!"]
];

// exit before logs are touched if process is an sctp NOT in create mode
if[.sctp.chainedtp and not .sctp.loggingmode=`create; :()];
.lg.o[`stpexit;"Closing off log files"];
Expand Down