mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 21:11:14 +00:00
fix(transit): mark the plan fallback's quota counts as independent writes
The empty-result fallback can call Google after Transitous, so lint:tx now sees two googleQuota.record() calls in TransitService.plan. Only one of them runs per request, and each is a call counter written after its own upstream request, so it cannot share a transaction with it.
This commit is contained in:
@@ -223,7 +223,13 @@ export class TransitService {
|
||||
return { ...data, provider };
|
||||
}
|
||||
|
||||
/** Route search between two coordinates. Returns compact itineraries for the picker. */
|
||||
/**
|
||||
* Route search between two coordinates. Returns compact itineraries for the picker.
|
||||
*
|
||||
* @txIndependent the only writes are Google's daily call counter, one after each
|
||||
* upstream request; each count stands on its own and cannot share a transaction
|
||||
* with the HTTP call it records.
|
||||
*/
|
||||
async plan(
|
||||
q: PlanQuery,
|
||||
language?: string,
|
||||
|
||||
Reference in New Issue
Block a user