diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/db.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/db.rs b/src/db.rs new file mode 100644 index 000000000000..57aa5f9827f6 --- /dev/null +++ b/src/db.rs @@ -0,0 +1,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>; +} |