feat: add Cargo.lock to project and change announce interval (#196)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2024-01-04 17:44:22 +08:00 committed by GitHub
parent 044e7be6b8
commit a6f9896576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3422 additions and 7 deletions

4
.gitignore vendored
View File

@ -49,9 +49,5 @@ Temporary Items
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk

3418
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package]
name = "dragonfly-client"
version = "0.1.9"
version = "0.1.10"
authors = ["The Dragonfly Developers"]
homepage = "https://d7y.io/"
repository = "https://github.com/dragonflyoss/client.git"

View File

@ -1,9 +1,10 @@
FROM rust as builder
FROM rust:1.75.0 as builder
RUN apt-get update && apt-get install -y openssl libclang-dev pkg-config protobuf-compiler
WORKDIR /app/client
COPY Cargo.toml ./
COPY Cargo.lock ./
COPY src/ src/
RUN cargo build --release --verbose

View File

@ -99,7 +99,7 @@ fn default_download_max_schedule_count() -> u32 {
// default_scheduler_announce_interval is the default interval to announce peer to the scheduler.
#[inline]
fn default_scheduler_announce_interval() -> Duration {
Duration::from_secs(30)
Duration::from_secs(300)
}
// default_scheduler_schedule_timeout is the default timeout for scheduling.