mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
fix: Use force_full=true for database sync after project sync/bisync
After rclone synchronizes files between local and cloud storage, the database needs to perform a full scan to ensure it captures all changes. Previously, incremental sync (watermark optimization) could miss files that were changed remotely. Changes: - project sync command now calls /project/sync?force_full=true - project bisync command now calls /project/sync?force_full=true - Ensures complete database refresh after file synchronization This guarantees the database is fully in sync with the filesystem after any rclone sync or bisync operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
"""Cloud bisync utility functions for Basic Memory CLI."""
|
||||
|
||||
import asyncio
|
||||
import platform
|
||||
import subprocess
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from basic_memory.cli.commands.cloud.api_client import make_api_request
|
||||
|
||||
@@ -307,8 +307,6 @@ def remove_project(
|
||||
if not delete_notes:
|
||||
if local_path:
|
||||
console.print(f"[yellow]Note: Local files remain at {local_path}[/yellow]")
|
||||
else:
|
||||
console.print("[yellow]Note: Cloud project files have not been deleted.[/yellow]")
|
||||
|
||||
except Exception as e:
|
||||
console.print(f"[red]Error removing project: {str(e)}[/red]")
|
||||
@@ -485,7 +483,9 @@ def sync_project_command(
|
||||
async def _trigger_db_sync():
|
||||
async with get_client() as client:
|
||||
permalink = generate_permalink(name)
|
||||
response = await call_post(client, f"/{permalink}/project/sync", json={})
|
||||
response = await call_post(
|
||||
client, f"/{permalink}/project/sync?force_full=true", json={}
|
||||
)
|
||||
return response.json()
|
||||
|
||||
try:
|
||||
@@ -581,7 +581,9 @@ def bisync_project_command(
|
||||
async def _trigger_db_sync():
|
||||
async with get_client() as client:
|
||||
permalink = generate_permalink(name)
|
||||
response = await call_post(client, f"/{permalink}/project/sync", json={})
|
||||
response = await call_post(
|
||||
client, f"/{permalink}/project/sync?force_full=true", json={}
|
||||
)
|
||||
return response.json()
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user