forked from KxSystems/kdb-tick
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchainedr.q
19 lines (13 loc) · 796 Bytes
/
chainedr.q
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\l lib/r.q / load up common rdb codebase
.u.end:{
@[`.;tables[];@[;`sym;`g#]0#]; / empty each table and then apply grouped attribute on sym
};
.u.x:.z.x,(count .z.x)_enlist":5110" / get the chained tickerplant port, default is 5110
/==============================================================
if[not system"p"; / if port is not set
system "p 5111" / open port 5111
];
if[not "w"=first string .z.o; / if not windows architecture
system "sleep 1" / sleep for 1 second
];
.u.rep .(hopen`$":",.u.x 0)"(.u.sub[`;`];$[`h in key `.u;.u.h(`.u;`i`L);.u[`i`L]])" / fetch (schema;(logcount;log)) from tickerplant (potentially via chained ticker plant)