10 Commits

Author SHA1 Message Date
5f3d042d18 Merge pull request #9 from flibusta-apps/dependabot/github_actions/github/codeql-action-4
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
rust-clippy analyze / Run rust-clippy analyzing (push) Has been cancelled
Bump github/codeql-action from 3 to 4
2025-10-14 18:01:57 +02:00
dependabot[bot]
e7a6981b9e Bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-08 01:06:54 +00:00
7473ef5814 Merge pull request #8 from flibusta-apps/dependabot/github_actions/actions/checkout-5
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
rust-clippy analyze / Run rust-clippy analyzing (push) Has been cancelled
Bump actions/checkout from 4 to 5
2025-09-10 17:04:03 +02:00
1d58813c9f Update deps
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
rust-clippy analyze / Run rust-clippy analyzing (push) Has been cancelled
2025-08-31 13:52:51 +02:00
dependabot[bot]
8a9fb48ceb Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 01:37:32 +00:00
b21e4ff30d Create rust-clippy.yml
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
rust-clippy analyze / Run rust-clippy analyzing (push) Has been cancelled
2025-08-17 23:29:11 +02:00
27b1d3b7d3 Merge pull request #7 from flibusta-apps/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-17 23:14:13 +02:00
dependabot[bot]
d79a91b8ff Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 10:03:10 +00:00
ece17cea77 Optimize release build
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
2025-06-28 22:33:53 +02:00
c2ef4c6044 Update deps 2025-06-28 22:10:50 +02:00
5 changed files with 644 additions and 385 deletions

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3

55
.github/workflows/rust-clippy.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/
name: rust-clippy analyze
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '44 5 * * 6'
jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
- name: Run rust-clippy
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true

56
.vscode/launch.json vendored
View File

@@ -1,56 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'batch_downloader'",
"cargo": {
"args": [
"build",
"--bin=batch_downloader",
"--package=batch_downloader"
],
"filter": {
"name": "batch_downloader",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}",
"env": {
"API_KEY": "debug",
"MINIO_HOST": "minio.kurbezz.ru:9000",
"MINIO_BUCKET": "book.archives",
"MINIO_ACCESS_KEY": "SAYRdiuaMvc3gjtxGZRm",
"MINIO_SECRET_KEY": "MUwBZs80J8rzKKJvp9Iv4tLBfyxakH7MkrgHiWc1",
"LIBRARY_API_KEY": "v3TGJxquSX8qg42EdeatASJddrSDcPdK",
"LIBRARY_URL": "https://book-library.kurbezz.ru",
"CACHE_API_KEY": "kGaA6feem7Nz5ZuRQDp6L8pdwEdnCAKH",
"CACHE_URL": "https://book-channel-cache.kurbezz.ru",
}
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'batch_downloader'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=batch_downloader",
"--package=batch_downloader"
],
"filter": {
"name": "batch_downloader",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}

891
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,20 @@ name = "batch_downloader"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[profile.release]
opt-level = 3
debug = false
strip = true
lto = true
codegen-units = 1
panic = 'abort'
[profile.profiling]
inherits = "release"
debug = true
strip = false
[dependencies] [dependencies]
tokio = { version = "1.44.1", features = ["full"] } tokio = { version = "1.44.1", features = ["full"] }
@@ -13,20 +26,20 @@ futures-util = "0.3.31"
tracing = "0.1.41" tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"]} tracing-subscriber = { version = "0.3.19", features = ["env-filter"]}
sentry-tracing = "0.36.0" sentry-tracing = "0.42.0"
tower-http = { version = "0.6.2", features = ["trace"] } tower-http = { version = "0.6.2", features = ["trace"] }
once_cell = "1.21.1" once_cell = "1.21.1"
axum = { version = "0.8.1", features = ["multipart"] } axum = { version = "0.8.1", features = ["multipart"] }
axum-prometheus = "0.8.0" axum-prometheus = "0.9.0"
serde = { version = "1.0.219", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140" serde_json = "1.0.140"
moka = { version = "0.12.10", features = ["future"] } moka = { version = "0.12.10", features = ["future"] }
md5 = "0.7.0" md5 = "0.8.0"
smallvec = { version = "1.14.0", features = ["serde"] } smallvec = { version = "1.14.0", features = ["serde"] }
smartstring = { version = "1.0.1", features = ["serde"] } smartstring = { version = "1.0.1", features = ["serde"] }
@@ -34,7 +47,7 @@ reqwest = { version = "0.12.15", features = ["json", "stream", "multipart"] }
bytes = "1.10.1" bytes = "1.10.1"
tempfile = "3.19.1" tempfile = "3.19.1"
zip = "2.4.2" zip = "4.6.0"
base64 = "0.22.1" base64 = "0.22.1"
@@ -42,6 +55,6 @@ async-stream = "0.3.6"
translit = "0.6.0" translit = "0.6.0"
sentry = { version = "0.36.0", features = ["debug-images"] } sentry = { version = "0.42.0", features = ["debug-images"] }
chrono = "0.4.40" chrono = "0.4.40"