6d63f2f299
Save hooks and meetingID mappings to redis and get them back when the application starts. Still missing a way to remove old data in case the app loses events (e.g. a hook for a specific meeting might stay on redis forever if the app lost the meeting_destroyed event).
20 lines
548 B
CoffeeScript
20 lines
548 B
CoffeeScript
config = require("./config")
|
|
Hook = require("./hook")
|
|
MeetingIDMap = require("./meeting_id_map")
|
|
WebHooks = require("./web_hooks")
|
|
WebServer = require("./web_server")
|
|
|
|
# Class that defines the application. Listens for events on redis and starts the
|
|
# process to perform the callback calls.
|
|
module.exports = class Application
|
|
|
|
constructor: ->
|
|
@webHooks = new WebHooks()
|
|
@webServer = new WebServer()
|
|
|
|
start: ->
|
|
Hook.initialize =>
|
|
MeetingIDMap.initialize =>
|
|
@webServer.start(config.server.port)
|
|
@webHooks.start()
|