Skip to content

Introduce a nightly maintenance command to handle recurring housekeeping tasks #6590

@jeremystretch

Description

@jeremystretch

Proposed Changes

Add a new management command (e.g. manage.py housekeeping) intended to be run nightly. This can take care of recurring tasks such as:

  • Deleting expired changelog records
  • Clearing out expired auth sessions
  • Recording usage statistics (for future purposes)

The installation and upgrade documentation will be updated to include creating a cron job to run this command nightly.

Justification

This would allow us to offload the pseudo-random clearing of expired changelog records from the middleware (see #6056), and provide a foundation for similar additional uses in future releases.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: housekeepingChanges to the application which do not directly impact the end user

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions