runtime: add execution concurrency limits
This commit is contained in:
@@ -698,15 +698,32 @@ fn default_operation_category() -> String {
|
||||
}
|
||||
|
||||
impl AdminService {
|
||||
#[cfg(test)]
|
||||
pub fn new(
|
||||
registry: PostgresRegistry,
|
||||
storage_root: PathBuf,
|
||||
auth_settings: AuthSettings,
|
||||
secret_crypto: SecretCrypto,
|
||||
) -> Self {
|
||||
Self::new_with_runtime(
|
||||
registry,
|
||||
storage_root,
|
||||
auth_settings,
|
||||
secret_crypto,
|
||||
RuntimeExecutor::new(),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn new_with_runtime(
|
||||
registry: PostgresRegistry,
|
||||
storage_root: PathBuf,
|
||||
auth_settings: AuthSettings,
|
||||
secret_crypto: SecretCrypto,
|
||||
runtime: RuntimeExecutor,
|
||||
) -> Self {
|
||||
Self {
|
||||
registry,
|
||||
runtime: RuntimeExecutor::new(),
|
||||
runtime,
|
||||
storage: LocalArtifactStorage::new(storage_root),
|
||||
auth_settings,
|
||||
secret_crypto,
|
||||
@@ -4881,6 +4898,7 @@ fn runtime_error_code(error: &RuntimeError) -> &'static str {
|
||||
RuntimeError::SoapAdapter(_) => "soap_error",
|
||||
RuntimeError::WebsocketAdapter(_) => "websocket_error",
|
||||
RuntimeError::UnsupportedProtocol { .. } => "unsupported_protocol",
|
||||
RuntimeError::ConcurrencyLimitExceeded { .. } => "runtime_overloaded",
|
||||
RuntimeError::MissingStreamingConfig { .. } => "streaming_config_error",
|
||||
RuntimeError::UnsupportedExecutionMode { .. } => "streaming_mode_error",
|
||||
RuntimeError::InvalidStreamingPayload { .. } => "streaming_payload_error",
|
||||
|
||||
Reference in New Issue
Block a user