about summary refs log tree commit diff
path: root/src/db.rs
blob: 57aa5f9827f679d551a138b03ed71facc58c1cb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
//! This module implements the database connection actor.

use actix::prelude::*;
use diesel::prelude::PgConnection;
use diesel::r2d2::{Pool, ConnectionManager};

/// The DB actor itself. Several of these will be run in parallel by
/// `SyncArbiter`.
pub struct DbExecutor(pub Pool<ConnectionManager<PgConnection>>);

impl Actor for DbExecutor {
    type Context = SyncContext<Self>;
}