Add IPC notifications to sync dashboard after sync completes
This commit is contained in:
@@ -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 [
|
||||||
|
|||||||
Reference in New Issue
Block a user