File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -561,6 +561,7 @@ async fn main() {
561
561
subscriptions. clone ( ) ,
562
562
postgres_conn_pool. clone ( ) ,
563
563
stores_metrics_registry. clone ( ) ,
564
+ * EXPERIMENTAL_READONLY_DB ,
564
565
) ) ,
565
566
)
566
567
} )
Original file line number Diff line number Diff line change @@ -196,12 +196,15 @@ impl Store {
196
196
subscriptions : Option < Arc < SubscriptionManager > > ,
197
197
pool : Pool < ConnectionManager < PgConnection > > ,
198
198
registry : Arc < dyn MetricsRegistry > ,
199
+ readonly_db : bool ,
199
200
) -> Self {
200
201
// Create a store-specific logger
201
202
let logger = logger. new ( o ! ( "component" => "Store" ) ) ;
202
203
203
204
// Create the entities table (if necessary)
204
- initiate_schema ( & logger, & pool. get ( ) . unwrap ( ) , & pool. get ( ) . unwrap ( ) ) ;
205
+ if !readonly_db {
206
+ initiate_schema ( & logger, & pool. get ( ) . unwrap ( ) , & pool. get ( ) . unwrap ( ) ) ;
207
+ }
205
208
206
209
// Create the store
207
210
let store = StoreInner {
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ lazy_static! {
76
76
Some ( subscriptions) ,
77
77
postgres_conn_pool,
78
78
registry. clone( ) ,
79
+ false ,
79
80
) )
80
81
} )
81
82
} ) . join( ) . unwrap( )
You can’t perform that action at this time.
0 commit comments