aboutsummaryrefslogtreecommitdiffstats
path: root/src/github.rs
diff options
context:
space:
mode:
authorTeddy Wing2017-11-14 23:46:27 +0100
committerTeddy Wing2017-11-14 23:46:27 +0100
commitf9b13604484fa7924efb8cde0dd26de0276065ff (patch)
treec30b02f2fdade2465f5a6756ad6dde44ca1af62a /src/github.rs
parentd5f33a9a986f21c8b660eb1d3faa9953f2b8bba7 (diff)
downloadkipper-f9b13604484fa7924efb8cde0dd26de0276065ff.tar.bz2
find_and_track_build_and_update_status(): Move thread outside function
Instead of wrapping the inside of the function in a thread, put the thread on the outside, in `main()`. This is an effort to try to get around the `move`/lifetime issues I was having with the previous version. Add some extra logging so we have a better idea what's going on when. Remove the `expects` I had added and put the `Result` returns back. In `main()`, wrap the call to `find_and_track_build_and_update_status()` in a thread and sleep before calling it. This allows us to give Jenkins some time to warm up and create a job for our commit before we go ahead and try to request it from its API. Otherwise, if we kick off the Jenkins fetch too soon, our statuses aren't going to get updated because the job won't have been created and thus won't have been found on the `get_jobs()` call. Had to add some ugly `clone()`s to get around `move` compiler errors here. Next step is figuring out how to clean that up.
Diffstat (limited to 'src/github.rs')
0 files changed, 0 insertions, 0 deletions