Last Positions
The last_positions flow extracts
the most recent position of each vessels from the
positionstablethe current fleet segments, risk factor and control anteriority of each vessel from the
risk_factorstablethe current alerts of each vessel from the
pending_alertstablethe current beacon malfunctions of each vessel from the
beacon_malfunctionstablethe current reportings of each vessel from the
reportingstable
then joins the results and dumps them in the last_positions table, which is used
by the backend to to display vessels on the map.
It is scheduled to run every minute.