package http import ( "context" "log/slog" "time" "gitea.dcglab.co.uk/steve/restic-manager/internal/server/ws" ) // schedule_push.go — server → agent reconciliation push. // // Stubbed during the P2 redesign rewrite. The new wire shape (slim // schedules referencing source groups; groups inline by id at push // time) lands in Phase 3. Until then on-hello and post-CRUD pushes // are no-ops; the agent will keep its existing cron entries (none, // since there are no schedules yet) and the only operator-driven // jobs flow via run-now once the new UI is wired in Phase 4. func (s *Server) pushScheduleSetOnConn(ctx context.Context, hostID string, conn *ws.Conn) { slog.Debug("schedule push: stubbed during P2 redesign", "host_id", hostID) } func (s *Server) pushScheduleSetAsync(hostID string) { slog.Debug("schedule push async: stubbed during P2 redesign", "host_id", hostID) } func (s *Server) applyScheduleAck(ctx context.Context, hostID string, version int64, appliedAt time.Time) { if err := s.deps.Store.SetHostAppliedScheduleVersion(ctx, hostID, version); err != nil { slog.Warn("schedule.ack: persist applied version", "host_id", hostID, "err", err) } } func (s *Server) dispatchScheduledJob(ctx context.Context, hostID string, conn *ws.Conn, scheduleID string, scheduledAt time.Time) { slog.Info("schedule.fire: stubbed during P2 redesign", "host_id", hostID, "schedule_id", scheduleID, "scheduled_at", scheduledAt) }