Skip to content

Commit 692d84e

Browse files
Merge pull request #801 from Mark-Simulacrum/build-with-cargo-opts
Include .cargo in Dockerfile build
2 parents 0966876 + c356c4f commit 692d84e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ENV PATH=/root/.cargo/bin:$PATH
2929
# and doing a full build with it.
3030
WORKDIR /source
3131
COPY Cargo.lock Cargo.toml /source/
32+
COPY .cargo /source/.cargo
3233
RUN mkdir -p /source/src && \
3334
echo "fn main() {}" > /source/src/main.rs && \
3435
echo "fn main() {}" > /source/build.rs

src/runner/worker.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ impl<'a> Worker<'a> {
160160
let krate = if let Some(next) = (self.next_crate)()? {
161161
next
162162
} else {
163+
// Backoff from calling the server again, to reduce load when we're spinning until
164+
// the next experiment is ready.
165+
std::thread::sleep(Duration::from_secs(rand::random_range(3..10)));
163166
// We're done if no more crates left.
164167
return Ok(());
165168
};

0 commit comments

Comments
 (0)