Trigger a manual sync run
The sync worker normally runs on an Adaptive Cadence — every 15 minutes when chargers are active, hourly when idle, weekly when dormant. Trigger a manual sync run when you need fresh transactions reflected in billing immediately: after closing out a session with a VIP customer, while investigating a missing Lago event, or before pulling a reconciliation report.
A manual trigger also bumps the scheduler back to the Active tier (15-minute cadence) for the period that follows, so it’s the right tool when you know activity is about to pick up.
Prerequisites
Section titled “Prerequisites”- You are signed in to the admin web console with operator permissions.
- The sync worker container is running. If it isn’t, a manual trigger silently goes nowhere — the NOTIFY is fire-and-forget with no retry.
- You know which sync run you’re trying to produce. If you’re debugging a specific ChargeBox or idTag, have its identifier handy for the verify step.
Procedure
Section titled “Procedure”-
Open the Sync dashboard
From the admin console sidebar, go to Sync. The dashboard shows the current scheduler tier, the timestamp of the last run, and the Trigger Sync button.
Screenshot pending
Sync dashboard with Trigger Sync button visible
-
Click Trigger Sync
Click Trigger Sync. The console calls POST
/api/admin/sync/trigger, which sends a PostgreSQLNOTIFYon thesync_triggerchannel and returns immediately with{"message":"Sync trigger notification sent to worker"}.The button does not wait for the sync to finish — it only confirms the notification was sent. The sync itself happens asynchronously in the worker.
-
Wait for the worker to pick it up
The sync worker receives the notification within milliseconds over its dedicated LISTEN connection. It then:
- Records the manual activity, bumping the scheduler to the Active tier.
- Calls
handleSync()— unless a sync is already in flight, in which case the trigger is skipped (the worker logsSync already in progress, skipping...). - Re-evaluates the cadence tier once the run completes.
Verify
Section titled “Verify”Confirm the manual run actually executed:
- On the Sync dashboard, refresh and check that the “Last run” timestamp has advanced to within the last minute or two.
- Open the run detail — you should see a new entry showing
eventsCreatedandtransactionsProcessedcounts. - If you triggered the sync to chase a specific transaction, search the Lago event log for the matching Lago metric event.
- Confirm the scheduler tier is now Active (15-minute cadence) on the dashboard header.
If you have shell access to the sync worker container, you can also tail its logs and look for:
[Sync Worker] Received sync trigger notification from api[Sync Worker] Sync completed in 1.42s: 3 events created, 5 transactions processedIf something goes wrong
Section titled “If something goes wrong”Audit and reversibility
Section titled “Audit and reversibility”A manual trigger is not destructive. It does not write any state directly — it only asks the worker to run the same sync logic that runs on the cron schedule. Anything the resulting sync creates (Lago events, user mappings, reservation resolutions) is created by the sync run itself and is logged the same way as any scheduled run.
What gets recorded:
- The web app logs
Manual sync triggered via notificationat INFO. - The worker logs
Received sync trigger notification from apiand the resultingSync completedline with event and transaction counts. - The resulting sync run appears in the Sync dashboard’s run history alongside scheduled runs.
There is no “undo” for a sync run, because a sync run is itself an idempotent reconciliation — running it again won’t double-count events. If a manual trigger surfaces a bad event in Lago, the correction happens in Lago, not by reverting the sync.