feat(worker): poll + reconcile stopwatch to server (admin stop/cancel)
This commit is contained in:
@@ -13,6 +13,8 @@ export function useActiveSessions() {
|
||||
return useQuery({
|
||||
queryKey: ['sessions', 'active'],
|
||||
queryFn: () => apiFetch<WorkSession[]>('/api/sessions/active'),
|
||||
// Poll so the stopwatch converges to admin changes (stop/cancel) within ~15s.
|
||||
refetchInterval: 15000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user