1
0
Fork 0
forked from alemi/upub

chore: cleanup

This commit is contained in:
əlemi 2024-05-03 04:12:15 +02:00
parent a0df9f8cc4
commit 7454da6525
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 5 additions and 9 deletions

View file

@ -1,9 +1,9 @@
pub mod server; mod server;
pub mod model; mod model;
pub mod routes; mod routes;
pub mod cli; mod cli;
pub mod errors; mod errors;
#[cfg(feature = "migrations")] #[cfg(feature = "migrations")]
mod migrations; mod migrations;
@ -48,7 +48,6 @@ enum CliCommand {
/// apply database migrations /// apply database migrations
Migrate, Migrate,
#[cfg(feature = "faker")]
/// generate fake user, note and activity /// generate fake user, note and activity
Faker{ Faker{
/// how many fake statuses to insert for root user /// how many fake statuses to insert for root user
@ -123,7 +122,6 @@ async fn main() {
migrations::Migrator::up(&db, None) migrations::Migrator::up(&db, None)
.await.expect("error applying migrations"), .await.expect("error applying migrations"),
#[cfg(feature = "faker")]
CliCommand::Faker { count } => CliCommand::Faker { count } =>
cli::faker(&db, args.domain, count) cli::faker(&db, args.domain, count)
.await.expect("error creating fake entities"), .await.expect("error creating fake entities"),

View file

@ -17,8 +17,6 @@ impl Default for Dispatcher {
} }
impl Dispatcher { impl Dispatcher {
pub fn new() -> Self { Dispatcher::default() }
pub fn spawn(&self, db: DatabaseConnection, domain: String, poll_interval: u64) -> JoinHandle<()> { pub fn spawn(&self, db: DatabaseConnection, domain: String, poll_interval: u64) -> JoinHandle<()> {
let waker = self.waker.subscribe(); let waker = self.waker.subscribe();
tokio::spawn(async move { tokio::spawn(async move {