Усилить безопасность и надёжность выполнения операций
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
use std::{env, net::SocketAddr, time::Duration};
|
||||
|
||||
use crank_community_mcp::{
|
||||
auth::CommunityMachineCredentialVerifier, build_app, session::PostgresTransportSessionStore,
|
||||
auth::CommunityMachineCredentialVerifier, build_app_with_background_workers,
|
||||
session::PostgresTransportSessionStore,
|
||||
};
|
||||
use crank_registry::{PostgresPoolConfig, PostgresRegistry};
|
||||
use crank_runtime::{
|
||||
RequestRateLimitConfig, RequestRateLimiter, RuntimeCacheConfig, RuntimeCacheStores,
|
||||
RuntimeLimits, SecretCrypto, community_default,
|
||||
RuntimeLimits, SecretCrypto,
|
||||
};
|
||||
use sqlx::postgres::PgConnectOptions;
|
||||
use tokio::net::TcpListener;
|
||||
@@ -46,12 +47,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
)
|
||||
.await?;
|
||||
let secret_crypto = SecretCrypto::new(&env::var("CRANK_MASTER_KEY")?)?;
|
||||
let runtime = community_default()
|
||||
let runtime = crank_runtime::community_from_env()?
|
||||
.with_limits(runtime_limits)
|
||||
.with_response_cache(cache_stores.response.clone())
|
||||
.with_coordination_store(cache_stores.coordination.clone())
|
||||
.build();
|
||||
let app = build_app(
|
||||
let app = build_app_with_background_workers(
|
||||
registry,
|
||||
refresh_interval,
|
||||
base_url,
|
||||
|
||||
Reference in New Issue
Block a user