Skip to content

Add scheduled clean up of old bookings#34

Merged
nihas101 merged 2 commits into
mainfrom
feat/delete-old-bookings
Jul 11, 2026
Merged

Add scheduled clean up of old bookings#34
nihas101 merged 2 commits into
mainfrom
feat/delete-old-bookings

Conversation

@nihas101

@nihas101 nihas101 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

This MR adds a scheduled cleanup of 10 year old bookings to the service.

The job is executed with a delay of 1 hour and by default deletes a maximum of 1000 bookings per run before the cutoff (10 years).

This behavior can be customized with the following application properties:

  • midas.cleanup.enabled: Whether a cleanup of old bookings is triggered on startup of the application
  • midas.cleanup.cutoff: The period after which a booking is considered 'old' and eligible for cleanup
  • midas.cleanup.delayBetweenCleanups: Defines the duration between separate cleanup run
  • midas.cleanup.limit: The maximum number of bookings deleted during the cleanup phase. Setting this to -1 disables the limit completely.

Closes #31

@nihas101 nihas101 added this to the v1.0 milestone Jul 11, 2026
@nihas101 nihas101 self-assigned this Jul 11, 2026
@nihas101 nihas101 added the enhancement New feature or request label Jul 11, 2026
@nihas101 nihas101 linked an issue Jul 11, 2026 that may be closed by this pull request
@nihas101
nihas101 force-pushed the feat/delete-old-bookings branch from cb3952b to 3a5f1ee Compare July 11, 2026 10:33
@nihas101
nihas101 marked this pull request as ready for review July 11, 2026 10:33
@nihas101
nihas101 merged commit 11f28e3 into main Jul 11, 2026
1 check passed
@nihas101
nihas101 deleted the feat/delete-old-bookings branch July 11, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up 10-year old bookings periodically

1 participant