feat: add hourly portfolio sync history
This commit is contained in:
@@ -12,7 +12,6 @@ import type { TbankInstrument } from './tbank.client';
|
||||
|
||||
import { PrismaService } from '../../prisma/prisma.service';
|
||||
import { TbankErrorCode } from './tbank-error-code';
|
||||
import { tbankSourceTtlMs } from './tbank-source.policy';
|
||||
|
||||
const FIRST_BATCH_OFFSET = 0;
|
||||
const UNCHANGED_REVISION_INCREMENT = 0;
|
||||
@@ -320,11 +319,7 @@ function selectMetadata(
|
||||
return {
|
||||
data: usefulUid ? uid.data : (figi.data ?? uid.data),
|
||||
complete,
|
||||
fresh:
|
||||
complete &&
|
||||
// eslint-disable-next-line sonarjs/different-types-comparison -- The conditional aggregation is nullable at runtime; keep the freshness guard.
|
||||
fetchedAt !== null &&
|
||||
Date.now() - fetchedAt.valueOf() < tbankSourceTtlMs.metadata,
|
||||
fresh: complete,
|
||||
fetchedAt,
|
||||
dataRevision: used
|
||||
.map(
|
||||
|
||||
Reference in New Issue
Block a user