mirror of
https://github.com/bybrooklyn/alchemist.git
synced 2026-04-18 01:43:34 -04:00
fix: remove old db.rs and format db/ submodules
The db.rs → db/ split left the old file tracked, causing "module found at both db.rs and db/mod.rs" on CI. Also fixes import ordering flagged by cargo fmt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,8 @@ use sqlx::Row;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use super::types::*;
|
||||
use super::Db;
|
||||
use super::types::*;
|
||||
|
||||
impl Db {
|
||||
pub async fn get_watch_dirs(&self) -> Result<Vec<WatchDir>> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::error::Result;
|
||||
|
||||
use super::types::*;
|
||||
use super::Db;
|
||||
use super::types::*;
|
||||
|
||||
impl Db {
|
||||
pub async fn create_conversion_job(
|
||||
|
||||
@@ -48,7 +48,7 @@ pub enum SystemEvent {
|
||||
}
|
||||
|
||||
pub struct EventChannels {
|
||||
pub jobs: tokio::sync::broadcast::Sender<JobEvent>, // 1000 capacity - high volume
|
||||
pub jobs: tokio::sync::broadcast::Sender<JobEvent>, // 1000 capacity - high volume
|
||||
pub config: tokio::sync::broadcast::Sender<ConfigEvent>, // 50 capacity - rare
|
||||
pub system: tokio::sync::broadcast::Sender<SystemEvent>, // 100 capacity - medium
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ use sqlx::Row;
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
use super::Db;
|
||||
use super::timed_query;
|
||||
use super::types::*;
|
||||
use super::Db;
|
||||
|
||||
impl Db {
|
||||
pub async fn reset_interrupted_jobs(&self) -> Result<u64> {
|
||||
|
||||
@@ -11,8 +11,8 @@ pub use types::*;
|
||||
|
||||
use crate::error::{AlchemistError, Result};
|
||||
use sha2::{Digest, Sha256};
|
||||
use sqlx::sqlite::{SqliteConnectOptions, SqliteJournalMode};
|
||||
use sqlx::SqlitePool;
|
||||
use sqlx::sqlite::{SqliteConnectOptions, SqliteJournalMode};
|
||||
use std::time::Duration;
|
||||
use tokio::time::timeout;
|
||||
use tracing::info;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::error::Result;
|
||||
use sqlx::Row;
|
||||
|
||||
use super::Db;
|
||||
use super::timed_query;
|
||||
use super::types::*;
|
||||
use super::Db;
|
||||
|
||||
impl Db {
|
||||
pub async fn get_stats(&self) -> Result<serde_json::Value> {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use chrono::{DateTime, Utc};
|
||||
use crate::error::Result;
|
||||
use chrono::{DateTime, Utc};
|
||||
use sqlx::Row;
|
||||
|
||||
use super::timed_query;
|
||||
use super::types::*;
|
||||
use super::{hash_api_token, hash_session_token, Db};
|
||||
use super::{Db, hash_api_token, hash_session_token};
|
||||
|
||||
impl Db {
|
||||
pub async fn clear_completed_jobs(&self) -> Result<u64> {
|
||||
|
||||
Reference in New Issue
Block a user