End to end tests

This commit is contained in:
MaddoScientisto 2026-04-12 19:31:12 +02:00
commit fed82d1ae8
26 changed files with 1016 additions and 37 deletions

View file

@ -100,12 +100,13 @@ export async function markSearchProcessing(redis, searchId, ttlSeconds = 24 * 60
}), ttlSeconds);
}
export async function markSearchCompleted(redis, searchId, resultId, matchCount, ttlSeconds) {
export async function markSearchCompleted(redis, searchId, resultId, matchCount, ttlSeconds, metadata = {}) {
return updateSearchRecord(redis, searchId, (current) => ({
...current,
status: 'completed',
resultId,
matchCount,
completionCode: metadata.completionCode || null,
completedAt: Date.now()
}), ttlSeconds);
}