Skip to content

Commit

Permalink
Update DatafeedService.ts
Browse files Browse the repository at this point in the history
Increase threshold of pilot difference. It occured today, that the same timestamp was present 46 times. This indicated a Datafeed fault. However, after the issue had been fixed, the difference in pilot numbers was >75, resulting in the datafeed-cache never recovering. 
Increasing the difference to 500 should solve this issue, whilst still having the check of massive discrepancies between updates. Potentially this can be removed in the future.
  • Loading branch information
ngoerlitz authored Apr 30, 2024
1 parent 291254f commit 03e5bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/DatafeedService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function getDatafeed(): Promise<DatafeedModel | null> {
// Also, if we queried multiple times and the same timestamp was found 6 times, then we can be pretty sure that the datafeed failed
if (
(datafeedStatus.data != null &&
(Math.abs(datafeedStatus.data.pilots.length - df.pilots.length) > 75) || df.pilots.length == 0 || same_timestamp_count > 5)
(Math.abs(datafeedStatus.data.pilots.length - df.pilots.length) > 500) || df.pilots.length == 0 || same_timestamp_count > 5)
) {
console.error(
'\t Update failed! Previous Pilot Count: ',
Expand Down

0 comments on commit 03e5bb3

Please sign in to comment.