Skip to content

Commit

Permalink
Add config net_http_max_connections (#1371)
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix authored Sep 25, 2024
1 parent 5d7d8ce commit 57a5204
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
nightly.yml linguist-generated=true
release.yml linguist-generated=true
testing.yml linguist-generated=true
tests.yml linguist-generated=true
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- run: |
cargo build --bins --target=x86_64-unknown-linux-musl
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: edgedb-linux-binary
path: target/x86_64-unknown-linux-musl/debug/edgedb
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
- run: |
cargo run -- cli install -y --no-wait-for-exit-prompt
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: edgedb-linux-binary
path: linux-binary
Expand Down
4 changes: 4 additions & 0 deletions src/commands/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ pub async fn configure(
C::Set(Set {
parameter: S::StoreMigrationSdl(ConfigStr { value }),
}) => set(cli, "store_migration_sdl", None, format!("'{value}'")).await,
C::Set(Set {
parameter: S::NetHttpMaxConnections(ConfigStr { value }),
}) => set(cli, "net_http_max_connections", None, value).await,
C::Reset(Res { parameter }) => {
use crate::commands::parser::ConfigParameter as C;
let name = match parameter {
Expand All @@ -215,6 +218,7 @@ pub async fn configure(
C::AutoRebuildQueryCache => "auto_rebuild_query_cache",
C::AutoRebuildQueryCacheTimeout => "auto_rebuild_query_cache_timeout",
C::StoreMigrationSdl => "store_migration_sdl",
C::NetHttpMaxConnections => "net_http_max_connections",
};
print::completion(
&cli.execute(&format!("CONFIGURE INSTANCE RESET {name}"), &())
Expand Down
7 changes: 7 additions & 0 deletions src/commands/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@ pub enum ValueParameter {
/// * `AlwaysStore`
/// * `NeverStore`
StoreMigrationSdl(ConfigStr),

/// The maximum number of concurrent HTTP connections.
///
/// HTTP connections for the `std::net::http` module.
NetHttpMaxConnections(ConfigStr),
}

#[derive(clap::Subcommand, Clone, Debug)]
Expand Down Expand Up @@ -625,6 +630,8 @@ pub enum ConfigParameter {
AutoRebuildQueryCacheTimeout,
/// When to store resulting SDL of a Migration
StoreMigrationSdl,
/// The maximum number of concurrent HTTP connections.
NetHttpMaxConnections,
}

#[derive(clap::Args, Clone, Debug)]
Expand Down

0 comments on commit 57a5204

Please sign in to comment.