save tracks
All checks were successful
tests / fmt (push) Successful in 48s
tests / clippy (push) Successful in 1m14s
tests / pre-commit (push) Successful in 1m21s
tests / test (push) Successful in 1m32s
tests / build (push) Successful in 1m48s
deploy / release-image (push) Successful in 4m45s
All checks were successful
tests / fmt (push) Successful in 48s
tests / clippy (push) Successful in 1m14s
tests / pre-commit (push) Successful in 1m21s
tests / test (push) Successful in 1m32s
tests / build (push) Successful in 1m48s
deploy / release-image (push) Successful in 4m45s
This commit is contained in:
@@ -16,7 +16,7 @@ use futures::StreamExt;
|
||||
use signal::signal_handler;
|
||||
use songbird::{shards::TwilightMap, Songbird};
|
||||
use state::StateRef;
|
||||
use std::{env, error::Error, sync::Arc};
|
||||
use std::{env, error::Error, str::FromStr, sync::Arc};
|
||||
use tokio::select;
|
||||
use tracing::{debug, info};
|
||||
use twilight_cache_inmemory::InMemoryCache;
|
||||
@@ -41,9 +41,9 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
|
||||
|
||||
let (mut shards, state) = {
|
||||
let db = env::var("DATABASE_URL").map_err(|_| "DATABASE_URL is not set")?;
|
||||
let options = SqliteConnectOptions::new()
|
||||
.create_if_missing(true)
|
||||
.filename(&db);
|
||||
let options = SqliteConnectOptions::from_str(&db)
|
||||
.expect("could not create options")
|
||||
.create_if_missing(true);
|
||||
let pool = SqlitePoolOptions::new()
|
||||
.max_connections(5)
|
||||
.connect_with(options)
|
||||
|
||||
Reference in New Issue
Block a user