Skip to content

Commit 847f492

Browse files
authored
Merge pull request #362 from Sanketika-Obsrv/fix/dedup-config
Fix: Dedup config
2 parents 4f25f52 + 77ff81e commit 847f492

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

api-service/src/configs/Config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ export const config = {
7070
"denorm_redis_host": process.env.denorm_redis_host || "localhost",
7171
"denorm_redis_port": parseInt(process.env.denorm_redis_port as string) || 6379,
7272
"dedup_redis_host": process.env.dedup_redis_host || "localhost",
73-
"dedup_redis_port": parseInt(process.env.dedup_redis_port as string) || 6379
73+
"dedup_redis_port": parseInt(process.env.dedup_redis_port as string) || 6379,
74+
"dedup_period": parseInt(process.env.dedup_period as string) || 604800 // 7 days in seconds
7475
},
7576
"exclude_datasource_validation": process.env.exclude_datasource_validation ? process.env.exclude_datasource_validation.split(",") : ["system-stats", "failed-events-summary", "masterdata-system-stats", "system-events"], // list of datasource names to skip validation while calling query API
7677
"telemetry_dataset": process.env.telemetry_dataset || `${env}.system.telemetry.events`,

api-service/src/configs/DatasetConfigDefault.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export const defaultDatasetConfig = {
1313
"dedup_config": {
1414
"drop_duplicates": true,
1515
"dedup_key": "id",
16-
"dedup_period": 604800, // 7 days
16+
"dedup_period": config.redis_config.dedup_period // 7 days
1717
}
1818
},
1919
"dedup_config": {
2020
"drop_duplicates": false,
2121
"dedup_key": "id",
22-
"dedup_period": 604800, // 7 days
22+
"dedup_period": config.redis_config.dedup_period // 7 days
2323
},
2424
"denorm_config": {
2525
"redis_db_host": config.redis_config.denorm_redis_host,

0 commit comments

Comments
 (0)