feat(sat): add scheduled cron job for daily sync (Phase 6)

- Add sat-sync.job.ts with scheduled daily sync at 3:00 AM
- Automatic detection of tenants with active FIEL
- Initial sync (10 years) for new tenants, daily for existing
- Concurrent processing with configurable batch size
- Integration with app startup for production environment
- Install node-cron dependency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Consultoria AS
2026-01-25 00:53:54 +00:00
parent 473912bfd7
commit 0a65c60570
4 changed files with 189 additions and 2 deletions

17
pnpm-lock.yaml generated
View File

@@ -56,6 +56,9 @@ importers:
jsonwebtoken:
specifier: ^9.0.2
version: 9.0.3
node-cron:
specifier: ^4.2.1
version: 4.2.1
node-forge:
specifier: ^1.3.3
version: 1.3.3
@@ -81,6 +84,9 @@ importers:
'@types/node':
specifier: ^22.0.0
version: 22.19.7
'@types/node-cron':
specifier: ^3.0.11
version: 3.0.11
'@types/node-forge':
specifier: ^1.3.14
version: 1.3.14
@@ -1031,6 +1037,9 @@ packages:
'@types/ms@2.1.0':
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
'@types/node-cron@3.0.11':
resolution: {integrity: sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==}
'@types/node-forge@1.3.14':
resolution: {integrity: sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==}
@@ -1814,6 +1823,10 @@ packages:
sass:
optional: true
node-cron@4.2.1:
resolution: {integrity: sha512-lgimEHPE/QDgFlywTd8yTR61ptugX3Qer29efeyWw2rv259HtGBNn1vZVmp8lB9uo9wC0t/AT4iGqXxia+CJFg==}
engines: {node: '>=6.0.0'}
node-forge@1.3.3:
resolution: {integrity: sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==}
engines: {node: '>= 6.13.0'}
@@ -3080,6 +3093,8 @@ snapshots:
'@types/ms@2.1.0': {}
'@types/node-cron@3.0.11': {}
'@types/node-forge@1.3.14':
dependencies:
'@types/node': 22.19.7
@@ -3901,6 +3916,8 @@ snapshots:
- '@babel/core'
- babel-plugin-macros
node-cron@4.2.1: {}
node-forge@1.3.3: {}
node-releases@2.0.27: {}