Trading card city builder game?

remove more notifications code

+2 -17
+1 -12
server/src/server.gleam
··· 30 30 |> pog.pool_size(10) 31 31 |> pog.supervised() 32 32 33 - let notifications_name = process.new_name("notifications") 34 - let assert Ok(db_config) = pog.url_config(notifications_name, database_url) 35 - let database_notifications = 36 - db_config 37 - |> pog.notifications_supervised() 38 - 39 - let context = 40 - context.Context( 41 - db_name, 42 - pog.named_notifications_connection(notifications_name), 43 - ) 33 + let context = context.Context(db_name) 44 34 let server = 45 35 mist.new(fn(req) { router.handler(req, context) }) 46 36 |> mist.port(port) ··· 49 39 let assert Ok(_) = 50 40 sup.new(sup.OneForOne) 51 41 |> sup.add(database) 52 - |> sup.add(database_notifications) 53 42 |> sup.add(server) 54 43 |> sup.start() 55 44
+1 -1
server/src/server/context.gleam
··· 2 2 import pog 3 3 4 4 pub type Context { 5 - Context(db: Name(pog.Message), notifications: pog.NotificationsConnection) 5 + Context(db: Name(pog.Message)) 6 6 }
-4
server/src/websocket/state.gleam
··· 33 33 pog.named_connection(state.context.db) 34 34 } 35 35 36 - pub fn notifications_connection(state: State) -> pog.NotificationsConnection { 37 - state.context.notifications 38 - } 39 - 40 36 pub fn add_listener( 41 37 state: State, 42 38 channel: String,