vault backup: 2026-02-26 21:10:47
This commit is contained in:
@@ -49,7 +49,8 @@ def run() -> None:
|
||||
|
||||
for md_file in target.rglob('*.md'):
|
||||
rel = normalize_rel(md_file)
|
||||
if is_excluded(md_file):
|
||||
reason = is_excluded(md_file)
|
||||
if reason:
|
||||
secure_ids.add(rel)
|
||||
cur.execute(
|
||||
'''
|
||||
@@ -59,7 +60,7 @@ def run() -> None:
|
||||
risk = EXCLUDED.risk,
|
||||
updated_at = now()
|
||||
''',
|
||||
(rel, rel, 'excluded_or_sensitive'),
|
||||
(rel, rel, reason),
|
||||
)
|
||||
cur.execute('DELETE FROM memory_primary WHERE id=%s', (rel,))
|
||||
print(f'[QUARANTINED] {rel}')
|
||||
@@ -85,7 +86,7 @@ def run() -> None:
|
||||
|
||||
cur.execute('SELECT id FROM memory_primary')
|
||||
db_primary_ids = {row[0] for row in cur.fetchall()}
|
||||
stale_primary_ids = sorted(db_primary_ids - valid_ids)
|
||||
stale_primary_ids = sorted(db_primary_ids - valid_ids - set(failed_ids))
|
||||
for stale_id in stale_primary_ids:
|
||||
cur.execute('DELETE FROM memory_primary WHERE id=%s', (stale_id,))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user