Add IPC notifications to sync dashboard after sync completes

This commit is contained in:
Bendt
2025-12-19 16:01:44 -05:00
parent b9d818ac09
commit 4e859613f9

View File

@@ -1038,6 +1038,11 @@ async def run_dashboard_sync(
# Schedule next sync # Schedule next sync
dashboard.schedule_next_sync() dashboard.schedule_next_sync()
# Notify all running TUI apps to refresh their data
from src.utils.ipc import notify_all
await notify_all({"source": "sync_dashboard_demo"})
except Exception as e: except Exception as e:
tracker.error_task("archive", str(e)) tracker.error_task("archive", str(e))
@@ -1070,6 +1075,7 @@ async def run_dashboard_sync(
) )
from src.utils.calendar_utils import save_events_to_vdir, save_events_to_file from src.utils.calendar_utils import save_events_to_vdir, save_events_to_file
from src.utils.notifications import notify_new_emails from src.utils.notifications import notify_new_emails
from src.utils.ipc import notify_all
config = dashboard._sync_config config = dashboard._sync_config
@@ -1372,6 +1378,9 @@ async def run_dashboard_sync(
# Schedule next sync # Schedule next sync
dashboard.schedule_next_sync() dashboard.schedule_next_sync()
# Notify all running TUI apps to refresh their data
await notify_all({"source": "sync_dashboard"})
except Exception as e: except Exception as e:
# If we fail early (e.g., auth), log to the first pending task # If we fail early (e.g., auth), log to the first pending task
for task_id in [ for task_id in [