Fixed lock mechanism, and some resendItem types

This commit is contained in:
SepehrYahyaee
2026-04-26 15:58:21 +03:30
parent b5b3b722c6
commit 885678df7d
7 changed files with 188 additions and 193 deletions

View File

@@ -305,15 +305,7 @@ export class ExpertBlameService {
for (const doc of visibleCases) {
const w = doc.workflow as Record<string, unknown> | undefined;
if (!w?.locked) continue;
const la = w.lockedAt;
if (!la) {
staleIds.add(String(doc._id));
continue;
}
if (
Date.now() >=
new Date(la as string | Date).getTime() + this.blameV2LockTtlMs
) {
if (!this.isBlameV2WorkflowLockCurrentlyEnforced(doc as any)) {
staleIds.add(String(doc._id));
}
}