File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ fn db_file_path(id: &str) -> std::path::PathBuf {
1919}
2020
2121fn db_url ( id : & str ) -> String {
22- format ! ( "sqlite://{}?mode=rwc" , db_file_path( id) . display( ) )
22+ format ! (
23+ "sqlite://{}?mode=rwc&busy_timeout=5000" ,
24+ db_file_path( id) . display( )
25+ )
2326}
2427
2528async fn setup_db ( id : & str ) {
@@ -70,8 +73,13 @@ routes:
7073 concurrency: 4
7174 batch_size: 128
7275 input:
73- memory: { topic: "sqlx-sqlite-in" }
76+ memory: { topic: "sqlx-sqlite-in", enable_nack: true }
7477 output:
78+ middlewares:
79+ - retry:
80+ max_attempts: 10
81+ initial_interval_ms: 100
82+ max_interval_ms: 1000
7583 sqlx:
7684 url: "{db_url}"
7785 table: "messages"
@@ -80,6 +88,11 @@ routes:
8088 concurrency: 4
8189 batch_size: 128
8290 input:
91+ middlewares:
92+ - retry:
93+ max_attempts: 10
94+ initial_interval_ms: 100
95+ max_interval_ms: 1000
8396 sqlx:
8497 url: "{db_url}"
8598 table: "messages"
You can’t perform that action at this time.
0 commit comments