about summary refs log tree commit diff
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs13
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>;
+}