diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..f4787e4 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,15 @@ +name: Build and push the dev image + +on: + push: + branches: [ dev ] + +jobs: + call-build-and-push: + name: Trigger container build and push + permissions: + contents: read + id-token: write + packages: write + uses: ./.github/workflows/build-and-push.yml + secrets: inherit diff --git a/src/bin/server.rs b/src/bin/server.rs index f3d5524..f18b9b3 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -6,5 +6,18 @@ fn main() { let listen_at = env::args() .nth(1) .unwrap_or_else(|| "127.0.0.1:8080".to_string()); - server::start_server(&listen_at, 10, 4); + + let queue_size = env::args() + .nth(2) + .unwrap_or_else(|| "10".to_string()) + .parse::() + .unwrap();; + + let thread_count = env::args() + .nth(3) + .unwrap_or_else(|| "4".to_string()) + .parse::() + .unwrap();; + + server::start_server(&listen_at, queue_size, thread_count); }