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

Add endpoint for removing expired lco scheduler events #37

Merged
merged 8 commits into from
Nov 8, 2024
Merged

Conversation

timbeccue
Copy link
Collaborator

@timbeccue timbeccue commented Oct 28, 2024

This PR adds a new endpoint to the calendar api that helps with managing events created by the LCO scheduler.

Any events that are created from the scheduler will have the origin attribute as "lco". When new schedules for a site replace existing events, this endpoint will be used to clear the ptr calendar of the now-outdated events. It works using a query for all events at a given site where the start date is after a provided cutoff threshold, and the origin is "lco".

The endpoint will return a list of project_ids for any photon ranch projects that were scheduled during any of the deleted events. These projects will need to be deleted as well (though that doesn't happen here).

Also added a small change to the deployment script so that it doesn't run if the readme is the only file modified.

@timbeccue timbeccue marked this pull request as ready for review October 28, 2024 23:28
@timbeccue timbeccue merged commit 1f96edb into main Nov 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants