mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-01 16:59:22 +02:00
Update to fall back but still use cache
This commit is contained in:
@@ -272,8 +272,13 @@ LQIDAQAB
|
|||||||
logger.error(
|
logger.error(
|
||||||
`Allowing failure. Will retry one more time at next run interval.`
|
`Allowing failure. Will retry one more time at next run interval.`
|
||||||
);
|
);
|
||||||
// return last known good status
|
// Fall back to last known good status if we have
|
||||||
return status;
|
// one cached; otherwise return the freshly built
|
||||||
|
// status (with defaults) rather than undefined.
|
||||||
|
const lastKnownStatus = this.statusCache.get(
|
||||||
|
this.statusKey
|
||||||
|
) as LicenseStatus | undefined;
|
||||||
|
return lastKnownStatus ?? status;
|
||||||
} else {
|
} else {
|
||||||
// Subsequent failures: fail abruptly
|
// Subsequent failures: fail abruptly
|
||||||
throw e;
|
throw e;
|
||||||
|
|||||||
Reference in New Issue
Block a user