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

refactor: Simplify cron scaler code #6056

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joelsmith
Copy link
Contributor

@joelsmith joelsmith commented Aug 9, 2024

The current cron scaler code creates a cron object and starts it (which creates a goroutine and a lot of data to manage a cron engine) just so that it can find the next activation time. It also re-parses the cron strings on each iteration. This update only parses on creation of the trigger, then uses the cron schedule object directly to get the next activation time.

Checklist

@joelsmith joelsmith requested a review from a team as a code owner August 9, 2024 06:27
@joelsmith joelsmith changed the title Simplify cron scaler code refactor: Simplify cron scaler code Aug 10, 2024
@JorTurFer
Copy link
Member

JorTurFer commented Aug 12, 2024

/run-e2e cron
Update: You can check the progress here

@JorTurFer
Copy link
Member

and now DCO xD

@SpiritZhou
Copy link
Contributor

@joelsmith Do you mind also refactoring it with the new declarative scaler configuration? #5797

@rickbrouwer
Copy link
Contributor

@joelsmith Do you mind also refactoring it with the new declarative scaler configuration? #5797

I have refactored it in #6098

@rickbrouwer rickbrouwer mentioned this pull request Sep 16, 2024
3 tasks
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.

4 participants