cal-itp/graas

resolve cyclic failure between trip inference and trip ID backfilling

Opened this issue · 0 comments

Currently, if trip inference fails to assign a trip ID for a position update, the update is sent with a null value for the trip-id field. The server will then attempt to backfill the trip ID using block assignments. If not block assignments exist for the agency in question, a DB query will occur every 3 seconds.

A possible mitigation is to count the number of times we have attempted to load block assignments for an agency per hour. If the value crosses a threshold, don't try again until the hour is up.