Files
sm-sitemap-plugin/schedule.go
Jakub Zych 653627b8c4 feat: real lastmod from record events and debounced rebuilds
- RecordSaved with a change outside golem15.sitemap.lastmod_ignore moves
  the lastmod of the record's rows (only the changed locale's for a
  translated change); a no-op save, an ignored change or a rebuild does not
- RecordDeleted takes the record's rows out of the files at once
- record events queue one rebuild per golem15.sitemap.rebuild_delay_seconds
  (rebuild_pending_until, P33-12); the job clears it when it starts
- sitemap:rebuild [--queue], scheduled nightly at 03:00 (pact.HasSchedule)
2026-11-04 11:17:28 +01:00

12 lines
400 B
Go

package sitemap
import "git.golem15.com/golem15/summercms/modules/pact"
// Schedule runs sitemap:rebuild every night at 03:00 (app timezone), so
// the files follow content that changed without a record event.
func (p *Plugin) Schedule() []pact.ScheduledCommand {
return []pact.ScheduledCommand{{Command: "sitemap:rebuild", Cadence: pact.DailyAt(3, 0)}}
}
var _ pact.HasSchedule = (*Plugin)(nil)