Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3386459
D4460.id14358.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
716 B
Referenced Files
None
Subscribers
None
D4460.id14358.diff
View Options
diff --git a/services/identity/src/database.rs b/services/identity/src/database.rs
--- a/services/identity/src/database.rs
+++ b/services/identity/src/database.rs
@@ -1,5 +1,6 @@
use std::collections::HashMap;
use std::fmt::{Display, Formatter, Result as FmtResult};
+use std::sync::Arc;
use aws_sdk_dynamodb::model::AttributeValue;
use aws_sdk_dynamodb::output::{GetItemOutput, PutItemOutput};
@@ -23,13 +24,13 @@
#[derive(Clone)]
pub struct DatabaseClient {
- client: Client,
+ client: Arc<Client>,
}
impl DatabaseClient {
pub fn new(aws_config: &SdkConfig) -> Self {
DatabaseClient {
- client: Client::new(aws_config),
+ client: Arc::new(Client::new(aws_config)),
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 4:52 AM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599107
Default Alt Text
D4460.id14358.diff (716 B)
Attached To
Mode
D4460: [services] wrap database client in Arc to avoid creating a new client each time we clone
Attached
Detach File
Event Timeline
Log In to Comment