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 job uuids and change scheduler job slice to map #541

Merged
merged 2 commits into from
Aug 20, 2023
Merged

Conversation

JohnRoesler
Copy link
Contributor

@JohnRoesler JohnRoesler commented Aug 19, 2023

What does this do?

  • adds a uuid to each job
  • changes the scheduler jobs slice to be a map
    • this increases job removal performance, can be by ID now
    • also makes several other looks up more efficient doing map key lookup instead of looping slice

Which issue(s) does this PR fix/relate to?

resolves #526

List any changes that modify/break current functionality

  • removes the Swap and Less methods on the scheduler that were implemented for sorting jobs

Have you included tests for your changes?

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler JohnRoesler merged commit a7577a9 into main Aug 20, 2023
6 checks passed
@JohnRoesler JohnRoesler deleted the job-uuids branch August 20, 2023 20:09
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.

[FEATURE] - Give jobs a unique ID
1 participant