gojenkins
gojenkins copied to clipboard
Allow running the same job multiple times concurrently
I am not sure why this code was included originally. It prevents invoking a job multiple times with different parameters.
Hi @raxod502-plaid if i understand correctly, the queue period is very short (less than a few seconds? I don't have the exact number yet), but I am able to use the current code to trigger job multiple times, each triggering has a few seconds interval.
The queue period is exist in Jenkins API, I think it is there to prevent race condition in the server itself, before Jenkins API removing this queue period, i worry that simplify bypass it will get us into weird state.
OK, but the current behavior is definitely wrong; it returns a nil error value indicating that the job was triggered when it actually wasn't. The library should wait and retry if there's a mandatory waiting period. Furthermore, that Error.Printf
actually causes a panic due to some internal bug, which crashes the whole application. The overall effect is a very poor user experience.
I agree, fine with adding an automatic retry logic. then should return error if timeout on waiting.
See also #112
FWIW, we've applied this pull request in our fork and have been using it successfully for some months now to trigger ~100 instances of the same job in a minute or less.
We have same issue, but the PR needs to be extended to modify same code in Invoke()
method
FWIW, we've applied this pull request in our fork and have been using it successfully for some months now to trigger ~100 instances of the same job in a minute or less.
hi, I have met the same situation with yours, I wanna know if there is anything wrong with your job when you guys use this in your fork, thanks!
FWIW, we've applied this pull request in our fork and have been using it successfully for some months now to trigger ~100 instances of the same job in a minute or less.
hi, I have met the same situation with yours, I wanna know if there is anything wrong with your job when you guys use this in your fork, thanks!
No, works fine
FWIW, we've applied this pull request in our fork and have been using it successfully for some months now to trigger ~100 instances of the same job in a minute or less.
hi, I have met the same situation with yours, I wanna know if there is anything wrong with your job when you guys use this in your fork, thanks!
No, works fine
thanks for reply