Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine/cleanupmgr: move schedule data cleanup to job queue #4203

Merged
merged 29 commits into from
Dec 17, 2024

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Dec 17, 2024

Description:
This pull request moves the schedule data cleanup operations to the job queue. It is in charge of:

  • Removing shifts for invalid/deleted users
  • Removing temporary schedules that occur in the past

Out of Scope:

  • API key cleanup will be moved in a separate PR
  • Alert log cleanup will be moved in a separate PR

Additional Info:

  • Cleanup operation will run once per day, and each schedule is processed once per month
  • A catch was put in so that if a schedule has invalid JSON it will be logged and skipped (rather than perpetual failing)
  • Added missing periodic job for schedule shift cleanup

# Conflicts:
#	engine/cleanupmanager/db.go
#	engine/cleanupmanager/queries.sql
#	gadb/queries.sql.go
# Conflicts:
#	engine/cleanupmanager/queries.sql
#	engine/cleanupmanager/update.go
Copy link
Collaborator

@CameronJHall CameronJHall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, the changes look like they accomplish what they're meant to though

Copy link
Collaborator

@CameronJHall CameronJHall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name refactoring helps distinguish the different inputs, thanks for making those changes

@mastercactapus mastercactapus merged commit 8884bbb into master Dec 17, 2024
7 checks passed
@mastercactapus mastercactapus deleted the cleanup-mgr-schedule-data branch December 17, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants