feat(analytics): 📈 Enhance gov-detection algorithms in analytics backend API
This commit is contained in:
parent
46bbdcd49f
commit
a4df6aee51
1 changed files with 7 additions and 4 deletions
|
|
@ -67,14 +67,17 @@ export class GovDetectionService implements OnModuleInit {
|
|||
// Sync all detection data (ASN, IP ranges, Tor nodes, VPN data)
|
||||
const syncResult = await syncAllData()
|
||||
|
||||
const loadedSources = syncResult.sources.filter(s => !s.error)
|
||||
const failedSources = syncResult.sources.filter(s => s.error)
|
||||
|
||||
this.logger.log(
|
||||
`Data sync complete: ${syncResult.successful.length} sources loaded, ` +
|
||||
`${syncResult.failed.length} failed`,
|
||||
`Data sync complete: ${loadedSources.length} sources loaded, ` +
|
||||
`${failedSources.length} failed`,
|
||||
)
|
||||
|
||||
if (syncResult.failed.length > 0) {
|
||||
if (syncResult.errors.length > 0) {
|
||||
this.logger.warn(
|
||||
`Failed to sync data sources: ${syncResult.failed.map((f: { name: string }) => f.name).join(', ')}`,
|
||||
`Sync errors: ${syncResult.errors.join(', ')}`,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue