Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor(secret-sync): use filter conditions directly in daily retry status update

Igor Correa154e09ae8070
diff --git a/backend/src/services/secret-sync/secret-sync-queue.ts b/backend/src/services/secret-sync/secret-sync-queue.ts
index b1e1506bd0..e3c6eeacaa 100644
--- a/backend/src/services/secret-sync/secret-sync-queue.ts
+++ b/backend/src/services/secret-sync/secret-sync-queue.ts
@@ -1194,7 +1194,11 @@ export const secretSyncQueueFactory = ({
if (!failedSyncs.length) return;
await secretSyncDAL.update(
- { $in: { id: failedSyncs.map((sync) => sync.id) } },
+ {
+ syncStatus: SecretSyncStatus.Failed,
+ isAutoSyncEnabled: true,
+ $in: { destination: [...SECRET_SYNC_DAILY_RETRY_DESTINATIONS] }
+ },
{ syncStatus: SecretSyncStatus.Pending }
);