Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

Commit bac2d04

Browse files
committed
rename mega_url to path
1 parent 1ec958c commit bac2d04

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
DB_POSTGRESQL_URL = "postgres://postgres:postgres@localhost:5432/mega"
1+
MEGA_DB_SQLX_LOGGING = false
22

3-
DB_SQLX_LOGGING = false
3+
MEGA_DB_POSTGRESQL_URL="postgres://postgres:postgres@localhost:5432/mega"

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() {
4141
}
4242

4343
pub async fn db_connection() -> DatabaseConnection {
44-
let mut opt = ConnectOptions::new(env::var("DB_POSTGRESQL_URL").unwrap());
44+
let mut opt = ConnectOptions::new(env::var("MEGA_DB_POSTGRESQL_URL").unwrap());
4545
// max_connections is properly for double size of the cpu core
4646
opt.max_connections(16)
4747
.min_connections(2)
@@ -50,7 +50,7 @@ pub async fn db_connection() -> DatabaseConnection {
5050
.idle_timeout(Duration::from_secs(8))
5151
.max_lifetime(Duration::from_secs(8))
5252
.sqlx_logging(
53-
env::var("DB_SQLX_LOGGING")
53+
env::var("MEGA_DB_SQLX_LOGGING")
5454
.unwrap()
5555
.parse::<bool>()
5656
.unwrap(),
@@ -121,7 +121,7 @@ pub async fn add_and_push_to_remote(workspace: PathBuf) {
121121
url.set_path(&new_path);
122122

123123
println!("Found URL: {}", url);
124-
record.mega_url = Set(url.to_string());
124+
record.mega_url = Set(new_path);
125125

126126
Command::new("git")
127127
.arg("remote")

0 commit comments

Comments
 (0)