From 7869097ba50d5d623c37630b0242709958b56f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Fri, 28 Jul 2023 13:19:41 +0200 Subject: [PATCH] fix: use dataretention option for results ttl in database --- Adaptors/MongoDB/src/Table/DataModel/ResultDataModelMapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adaptors/MongoDB/src/Table/DataModel/ResultDataModelMapping.cs b/Adaptors/MongoDB/src/Table/DataModel/ResultDataModelMapping.cs index 81d03fd46..25cdf1867 100644 --- a/Adaptors/MongoDB/src/Table/DataModel/ResultDataModelMapping.cs +++ b/Adaptors/MongoDB/src/Table/DataModel/ResultDataModelMapping.cs @@ -79,7 +79,7 @@ public async Task InitializeIndexesAsync(IClientSessionHandle sessionHandle, IndexHelper.CreateHashedIndex(model => model.SessionId), IndexHelper.CreateHashedIndex(model => model.OwnerTaskId), IndexHelper.CreateAscendingIndex(model => model.CreationDate, - expireAfter: TimeSpan.FromDays(1)), + expireAfter: options.DataRetention), }; await collection.Indexes.CreateManyAsync(sessionHandle,