Skip to content

Commit

Permalink
update feed consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
briangu committed Dec 14, 2023
1 parent dc0c450 commit aef0250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/stocks/alpaca/ws/feed_consumer.kg
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ timeAnalyze::{time(analyze)}
analyzeComplete::{.d("analyze ms: ");.p(x)}
asyncAnalyze::.async(timeAnalyze;analyzeComplete)

updateDb::{[u d];u::x;d::{u?x}'cols;.d("insert: ");.d(d);.insert(prices;d)}
timeUpdateDb::{[ms];ms::time1(updateDb;x);.d(" ");.d(ms);.p(" ms")}
updateDb::{.insert(prices;x@cols)}
timeUpdateDb::{.d("insert: ");.d(x@cols);.d(" ");.d(time1(updateDb;x));.p(" ms")}

:" Called by server when there is a subscription update."
update::{timeUpdateDb(x);asyncAnalyze()}

0 comments on commit aef0250

Please sign in to comment.