-
Notifications
You must be signed in to change notification settings - Fork 243
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
Fixed scheduling ID of pipelines #109
Fixed scheduling ID of pipelines #109
Conversation
Codecov Report
@@ Coverage Diff @@
## master #109 +/- ##
==========================================
+ Coverage 64.33% 64.71% +0.38%
==========================================
Files 24 22 -2
Lines 2044 1913 -131
==========================================
- Hits 1315 1238 -77
+ Misses 579 539 -40
+ Partials 150 136 -14
Continue to review full report at Codecov.
|
Your fix does not work, @Skarlso 😞 This is also incompatible to existing boltDB databases. |
Oh buu. You're right. I should have tried with multiple pipelines. Okay, I have another fix in mind. Thanks for the review. Yeah, you are also right that this would require a redo of the DB. :/ |
@michelvocks Alright. This time it's working with multiple pipelines and multiple runs with quick button smashes. It's also warding against if multiple users are using Gaia at the same time and are trying to trigger a build at the same time. :) I think you'll be happy with this one. Hopefully. :D |
100336a
to
fbd475f
Compare
fbd475f
to
5c267a3
Compare
scheduler/scheduler.go
Outdated
// This means that one of the calls will take slightly longer (a couple of nanoseconds) | ||
// while the other finishes to save the pipelinerun. | ||
// This is to ensure that the highest ID for the next pipeline is calculated properly. | ||
if schedulerRunning { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did I even put an if here... 🤦♂️
scheduler/scheduler.go
Outdated
// while the other finishes to save the pipelinerun. | ||
// This is to ensure that the highest ID for the next pipeline is calculated properly. | ||
if schedulerRunning { | ||
for schedulerRunning { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I need to rethink this semaphore with a channel.
Omg what am I doing. Just use a waitgroup lock unlock. That's what they are for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🤗 ❤️
Deals with #108