fix(core): update

This commit is contained in:
2023-07-26 20:51:47 +02:00
parent 2abac29dff
commit 8ffdf58d68
8 changed files with 211 additions and 13745 deletions

View File

@@ -27,7 +27,9 @@ export class SmartUpdate {
const retrievedCacheData: ICacheStatus = await this.kvStore.readKey(npmnameArg);
if (retrievedCacheData) {
const lastCheckTimeStamp = plugins.smarttime.TimeStamp.fromMilliSeconds(retrievedCacheData.lastCheck);
const lastCheckTimeStamp = plugins.smarttime.TimeStamp.fromMilliSeconds(
retrievedCacheData.lastCheck
);
const tresholdTime = plugins.smarttime.getMilliSecondsFromUnits({ hours: 1 });
if (!lastCheckTimeStamp.isOlderThan(timeStamp, tresholdTime)) {
newCacheData.lastCheck = lastCheckTimeStamp.milliSeconds;