update ws
This commit is contained in:
parent
00f225c8cd
commit
8233738671
@ -467,7 +467,7 @@ async def get_stock(data: TickerData, api_key: str = Security(get_api_key)):
|
||||
res_json = orjson.dumps(res)
|
||||
compressed_data = gzip.compress(res_json)
|
||||
redis_client.set(cache_key, compressed_data)
|
||||
redis_client.expire(cache_key, 60*5)
|
||||
redis_client.expire(cache_key, 60*3)
|
||||
|
||||
return StreamingResponse(
|
||||
io.BytesIO(compressed_data),
|
||||
|
||||
@ -352,7 +352,7 @@ schedule.every(30).minutes.do(run_threaded, run_dividend_list).tag('dividend_lis
|
||||
schedule.every(15).minutes.do(run_threaded, run_cron_market_news).tag('market_news_job')
|
||||
schedule.every(30).minutes.do(run_threaded, run_cron_industry).tag('industry_job')
|
||||
|
||||
schedule.every(10).minutes.do(run_threaded, run_one_day_price).tag('one_day_price_job')
|
||||
schedule.every(7).minutes.do(run_threaded, run_one_day_price).tag('one_day_price_job')
|
||||
schedule.every(15).minutes.do(run_threaded, run_cron_heatmap).tag('heatmap_job')
|
||||
|
||||
|
||||
|
||||
@ -201,8 +201,8 @@ fastify.register(async function (fastify) {
|
||||
) {
|
||||
connection.socket.send(
|
||||
JSON.stringify({
|
||||
bp: jsonData.bp?.toFixed(2),
|
||||
ap: jsonData.ap?.toFixed(2),
|
||||
bp: jsonData.bp,
|
||||
ap: jsonData.ap,
|
||||
lp: jsonData.lp?.toFixed(2),
|
||||
type: jsonData.type,
|
||||
time: formatTimestampNewYork(jsonData?.t),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user