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

Decouple logic and periodic scheduling from internal tasks #633

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

ferranbt
Copy link
Contributor

@ferranbt ferranbt commented Jul 5, 2024

📝 Summary

This PR decouples some internal logic in Housekeeper and API in two functions, one with the core logic and another one that decides whether the core logic is executed or not given the slot.

📚 References


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@metachris
Copy link
Collaborator

I think the direction makes sense. I feel it's a bit confusing to split these up into a function with the same name but BySlot suffix, when really it does the execution but without the prechecks.

I would prefer to be more explicit and use WithoutChecks as suffix.

@ferranbt ferranbt merged commit 4d4478a into main Jul 5, 2024
4 checks passed
@ferranbt ferranbt deleted the ferranbt/decouple-periodic-tasks2 branch July 5, 2024 09:36
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