mbus-backend
    Preparing search index...

    Type Alias PreThreshold

    Waiting for a prediction of the right event to have a arrival timestamp that is at or after mustBeAfter and an arrival time less than thresh. A bus is xx minutes from the stop notification is then sent. To handle delayed and disappeared notifications, a candidateVid is set to the soonest arriving bus that arrives after mustbeAfter.

    type PreThreshold = {
        candidateVid: string | null;
        candidateVidPredPrev: number | null;
        event: BaseEvent;
        mustBeAfter: number;
        stage: 0;
        thresh: number;
    }
    Index
    candidateVid: string | null

    stores the bus that'll likely trigger the threshold notification, being only a candidate this can change as things are updated and such a change won't trigger a disappeared notification

    candidateVidPredPrev: number | null

    minutes

    event: BaseEvent
    mustBeAfter: number

    unix epoch milliseconds

    stage: 0
    thresh: number

    minutes